You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array initialisation is likely to be the source of bottlenecks in parallel workloads. Array initialisation for arbitrary typed elements needs to be sequential since the elements need to be initialised to a sensible value before GC gets to see it. However, for primitive types, int and float, one can allow parallel initialisation. OCaml supports Array.create_float, which returns uninitialised array, which can then be initialised in parallel. One can also safely return an uninitialized integer array by
letcreate_int : int -> int array =Obj.magic (Array.create_float)
Once the array is created, it can then be initialised in parallel.
The text was updated successfully, but these errors were encountered:
Array initialisation is likely to be the source of bottlenecks in parallel workloads. Array initialisation for arbitrary typed elements needs to be sequential since the elements need to be initialised to a sensible value before GC gets to see it. However, for primitive types,
int
andfloat
, one can allow parallel initialisation. OCaml supportsArray.create_float
, which returns uninitialised array, which can then be initialised in parallel. One can also safely return an uninitialized integer array byOnce the array is created, it can then be initialised in parallel.
The text was updated successfully, but these errors were encountered: