10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-25 20:27:28 +02:00

Small optimizations

This commit is contained in:
Anthony Scemama 2019-11-13 11:07:39 +01:00
parent 61ba79ee59
commit f93b2fe0a6

View File

@ -20,15 +20,15 @@ external popcnt : int64 -> int32 = "popcnt_bytecode" "popcnt"
[@@unboxed] [@@noalloc]
(** 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]
(** ctz instruction *)
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]
(** bsf instruction *)