[Mono-devel-list] [PATCH] Faster array bounds checking

Paolo Molaro lupus at ximian.com
Mon Apr 5 15:01:38 EDT 2004


On 04/01/04 Ben Maurer wrote:
> The attached patch makes mini use the compare reg,membase operation when
> it is doing array bounds checking. so, rather than:

Looks fine to commit with a changelog entry.

> The speedup was pretty big for a simple test case:

Completely non-reproducible. This kind of optimization can't make
this difference. Iff you measured this correctly, you're probably seeing
the effect of branch target alignment in loops which happens to favour
one of the two programs because the different code size changes the
alignment. On my system the patch gives a 0.5 % speedup
on your test, which is roughly what is expected. tests/sieve.exe has a
2% slowdown instead (likely for the same reason, since the code with the
patch or without is basically the same as far as the processor is
concerned: the only advantage of the patch is to reduce slightly the
code size which will eventually help).

lupus

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



More information about the Mono-devel-list mailing list