[Mono-dev] mono numerical performance

Konrad M. Kruczyński konrad.kruczynski at gmail.com
Sun Nov 20 11:38:10 EST 2011


Hi,

I'd like to add that you may gain something on MS JIT compiler using 
for (int i = 0 ; i < x.Length ; i++)
instead of
for (int i = 0 ; i < len ; i++)

This may seem counter intuitive, however that's the scenario in which
JIT eliminates array bound checking for the x array (however not for the
second one) as arrays have constant length. I am not sure whether Mini
recognizes that. I'm pretty sure that Hotspot is much smarter here ;)

As Zoltan wrote in the bug comments, enabling LLVM improves the results
a lot. This is, I guess, due to much better register allocation in which
domain Mini isn't too good - and probably other optimizations like
better loop unrolling.

If I remember correctly, there once was a branch of LLVM with array
bounds check elimination, is it still developed?

I am also curious which code patterns enable ABC elimination in Mini.

On Sun, 2011-11-20 at 08:01 -0500, Jonathan Shore wrote:
> Here is a link to and entry in bugzilla with attached code.  I could
> not send to the list:
> 
> 
> http://bugzilla.xamarin.com/show_bug.cgi?id=2098
> 

--
Regards,
 Konrad




More information about the Mono-devel-list mailing list