OCaml - array of arrays and garbage collection
1 answer
If I understand correctly, the garbage collector scans the fields int array
. For each field, in turn, he will notice that he is unpacked and does not chase him further.
This behavior may not be very effective; the main aspect is that it is safe. This would not be safe float array
unless each individual float
was boxed (which in turn would be area inefficient).
If the above (temporary) inefficiency is a problem, the module Bigarray
can provide a solution.
+6
source to share