This project is read-only.
.Garbage Collector Benchmark:

Unit in seconds - Smaller is better - you should consider a difference of 10% or less as negligible.


Analysis of the results:

That's the big benchmark with a lot of things to learn from!
Unsurprisingly, CrossNet is slower (in some extreme cases much slower) than .NET 2.0.
You can contribute here!
  • GC:
    • Several things here:
    • C++ pool is pretty much the fastest implementation that you can have. Everything is hardcoded, pretty much no test, just read / write a pointer for each allocate, deallocate. Dazzingly fast!
    • But clearly your allocations won't benefit from that (not that hardcoded, don't allocate / deallocate the same memory over and over...).
    • .NET 2.0 is almost 4 times slower than the fastest C++ implementation, and that's actually really fast.
    • .NET 2.0 is a generic allocator, with a ton of nice features...
    • Truth is that you would have to compare .NET 2.0 GC with C++ dlmalloc (very fast generic allocator), and you can see that dlmalloc is more than 2 times slower than .NET 2.0 GC!
    • So remember, .NET 2.0 GC is fast.
    • CrossNet is dog slow and that's not surprising (although it is not that slow when comparing with dlmalloc ;)
    • The major reason is the deallocation where we actually call the finalizer / deallocation for every single object, this portion represents 95% of the GC time!
    • If we solve this, the CrossNet GC should be much closer to .NET GC.
  • Binary Tree:
    • Crossnet is slower by 40% than .NET 2.0.
    • No surprise when looking at the GC numbers above.
    • Note that this benchmark doesn't do much beside allocating (except there is more tracing involved, that may explain the smaller gap with the previous GC benchmark).
  • Hashtable:
    • CrossNet is slightly slower than .NET 2.0 (by 10% or so).
    • The GC makes the difference but it is possible that STL hash_map reduces the gap, also in that benchmark we are doing real work (so we are not testing just the GC).
  • String concatenation:
    • CrossNet is slightly slower than .NET 2.0 (by 15% or so).
    • Again the GC makes the difference, but because we are doing real work it becomes less an issue.

Last edited Sep 6, 2007 at 5:57 AM by OlivierNallet, version 3


No comments yet.