[Mono-list] Array benchmark

Paolo Molaro lupus@ximian.com
Mon, 11 Oct 2004 17:38:26 +0200


On 10/09/04 Sijmen Mulder wrote:
> With all methods with all resolutions, Mono -is- slowest. Until..
> maximum optimalization is used. Then the Mono results are about 5
> times as good as with Microsoft.NET. Another weird thing is that
> normally, method 1 is way faster, but when Mono is used with maximum
> optimalization, method 2 is faster. And when the version with a
> resolution of a power of two is ran, both method 2 and 3 are faster.
> Just take a look at the pdf :)
> 
> Could someone explain this odd behaviour? And why the speed difference
> between non-optimized and optimized mono is so big? And why such
> optimalization is not used by default?

-O=all also enables dead code elimination. It currently is very aggressive,
so, since your benchmark does nothing useful, it figures it can eliminate 
most of the content of the loops. If you change your program to do something
that seems useful, like storing temp in a static field, you'll get
results closer to what you'd expect.
The optimization is not enabled by default since it makes for higher 
jit times and it has not been fully tested.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better