The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #13864 from gasche/faster-Float.Array.fill

faster Float.Array.fill

authored by

Gabriel Scherer and committed by
GitHub
6f24c5ac 7d111103

+3 -2
+3 -2
stdlib/float.ml
··· 185 185 186 186 external unsafe_fill 187 187 : t -> (int[@untagged]) -> (int[@untagged]) -> (float[@unboxed]) -> unit 188 - = "caml_floatarray_fill" "caml_floatarray_fill_unboxed" 188 + = "caml_floatarray_fill" "caml_floatarray_fill_unboxed" [@@noalloc] 189 189 190 190 external unsafe_blit: t -> int -> t -> int -> int -> unit = 191 191 "caml_floatarray_blit" [@@noalloc] ··· 271 271 else if length a2 = 0 then unsafe_sub a1 0 l1 272 272 else append_prim a1 a2 273 273 274 - let fill a ofs len v = 274 + (* inlining exposes a float-unboxing opportunity for [v] *) 275 + let[@inline] fill a ofs len v = 275 276 check a ofs len "Float.Array.fill"; 276 277 unsafe_fill a ofs len v 277 278