mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
Small optimizations
This commit is contained in:
parent
61ba79ee59
commit
f93b2fe0a6
@ -20,15 +20,15 @@ external popcnt : int64 -> int32 = "popcnt_bytecode" "popcnt"
|
|||||||
[@@unboxed] [@@noalloc]
|
[@@unboxed] [@@noalloc]
|
||||||
(** popcnt instruction *)
|
(** popcnt instruction *)
|
||||||
|
|
||||||
let popcnt i = popcnt i |> Int32.to_int
|
let popcnt i = (popcnt [@inlined] ) i |> Int32.to_int
|
||||||
|
|
||||||
external trailz : int64 -> int32 = "trailz_bytecode" "trailz"
|
external trailz : int64 -> int32 = "trailz_bytecode" "trailz" "int"
|
||||||
[@@unboxed] [@@noalloc]
|
[@@unboxed] [@@noalloc]
|
||||||
(** ctz instruction *)
|
(** ctz instruction *)
|
||||||
|
|
||||||
let trailz i = trailz i |> Int32.to_int
|
let trailz i = trailz i |> Int32.to_int
|
||||||
|
|
||||||
external leadz : int64 -> int32 = "leadz_bytecode" "leadz"
|
external leadz : int64 -> int32 = "leadz_bytecode" "leadz" "int"
|
||||||
[@@unboxed] [@@noalloc]
|
[@@unboxed] [@@noalloc]
|
||||||
(** bsf instruction *)
|
(** bsf instruction *)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user