|
|
|
|
|
by thelema314
5601 days ago
|
|
Actually, OCaml never generates objects like this on the stack - value creation is always taken literally. The OCaml compiler is really allocating all those records. It's just that their lifetime is almost zero, so the cost to clean them up is zero (as none get promoted from the minor heap to the major heap). And the cost to create them is almost zero, just a += and a compare. |
|
Because if it really would use something like malloc, I don't really see how it should be faster than the C version.