|
|
|
|
|
by iainmerrick
3216 days ago
|
|
In OCaml or on the JVM, an allocation is a pointer increment and comparison. That's true, but if (hopefully rarely) the object turns out to be needed later, it has to be copied to another heap, and that takes time and memory. Pointers need to be redirected and that takes a little work too. Bump allocators are definitely a huge win, as good as anything you can do in C/C++ and much more convenient for the programmer, but they're not a completely free lunch. |
|