GC performances
Lutger
lutger.blijdestijn at gmail.com
Mon Nov 26 04:58:38 PST 2007
Another interesting thing here is that the Java version beats all other
languages too, including the ones with manual memory management. But it
does cost a lot of memory.
I would guess that this is an ideal case for a copying garbage
collector? I wonder how much of an improvement such a GC will have in
normal applications, and how hard it will be to implement in D. Another
concern is what changes are needed in client code to work nicely with a
copying GC.
But this example does show how relative these microbenchmarks are. After
all, it costs the Java version more than ten times the memory to
outperform D, how will that affect the speed of a complex application?
btw. I tried implementing this with a freelist, as suggested by the
article at the digitalmars site, but it was slower than manual memory
management. Might be because the code for allocation wasn't inlined for
some reason.
Likely not the intent of the benchmark, but an array based
implementation could be faster here.
More information about the Digitalmars-d
mailing list