mmtk / mmtk-julia

Julia binding for MMTk
12 stars 9 forks source link

realloc in MMTk? #42

Open qinsoon opened 1 year ago

qinsoon commented 1 year ago

Currently we implement realloc by simply allocating a new array and copy the contents over. At some point, we probably would like to know how much overhead this would introduce. Alternatively, we may add a realloc method for MMTk allocators. The default implementation is the same allocation and mem copying, but for some allocators, they may provide a more efficient implementation.

qinsoon commented 1 year ago

The append microbenchmark does realloc a lot. When running with a large heap with no GC triggered, we are seeing that immix and sticky immix is roughly 10% slower than Julia's own allocation.