[Mono-devel-list] ABC removal benchmarks

massi at ximian.com massi at ximian.com
Tue Jul 13 10:14:14 EDT 2004

Here are the results of a simple benchmark I wrote.

The benchmark has three parts.
- ArrayScan is a microbenchmark that does just this: scan an
  array and write its elements (so it is expected to benefit
  a lot from ABC removal).
- QuickSortObject is an object sorting routine, in this case
  applied to String objects.
- QuickSortInt is the same sorting routine, rewritten for the
  int primitive type (generics would have helped here, but I
  wanted this to stay a 1.0 thing),

I also tested the time it takes to compile all mscorlib.dll
(mono --compile-all), just to see how the added optimization
affects the efficiency of the JIT.

All times are in seconds, and are the median (not the mean,
I was lazy) of five test runs on my PC.

optimizations         -all      default   deadce    abcrem    all,abcrem 
ArrayScan             4.751061  2.017731  1.969496  1.574359  1.564076   
QuickSortObject       2.318007  2.285564  2.279471  2.278028  2.202975   
QuickSortInt          2.633039  2.112552  2.110091  1.534102  1.537763   
compile mscorlib      0.807     1.105     1.416     1.439     1.733      

Here are percentage improvements against the mono default for
optimization options ((1-(x/default))*100).

optimizations         -all      default   deadce    abcrem    all,abcrem 
ArrayScan          -135.46      0         2.39     21.97     22.48       
QuickSortObject	     -1.41      0         0.26      0.32      3.61       
QuickSortInt        -24.63      0         0.11     27.38     27.20      
compile mscorlib     26.96      0       -28.14    -30.22    -56.83     

We see that code that heavily accesses arrays can have an
improvement of roughly 25%, while in other cases (like
QuickSortObject) the improvement is there, but is "lost in
the noise".
Probably an arithmetic library of vector operations is the
kind of code that would would benefit a lot from abcrem.

Of course, compilation times are not "improved", but it can
be clearly seen that once the SSA form is built (like with
the "deadce" option), abcrem does not take that much more :-)

That's all!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: benchmarks.cs
Type: text/x-csharp
Size: 3106 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040713/62a47e4f/attachment.bin 

More information about the Mono-devel-list mailing list