[Mono-list] Performance / array access
Tom Fransen
t.fransen@mailned.nl
Sun, 12 Jan 2003 19:12:03 +0100
Hi everybody,
I am looking into the performance of both the Microsoft .NET Framework and
Mono.
What I found is that the Microsoft code for bubble sort runs a lot faster
(3x)
than the Mono code. Looking further into the problem I found
that when compiling a assembly with the switch 'optimize for speed' (on
Windows)
the JIT optimization is enabled via some attribute in the assembly.
Look at the assembly code that is generated I saw that in case of
optimized code there is no longer a check (at least not within the for loop)
that
checks if the index used to store items in the array is within the
required bounds.
I case of Mono I see (if I interpret this correctly) that within
the for loop each array index is checked to see if it is within bounds.
Here are my questions
a) Is my observation (for Mono) correct?
b) Is this something that still needs to be implemented in the Mono JIT
compiler or
do I need to enable some setting for this optimization?
Can anybody comment on this.
regards,
Tom