[Mono-bugs] [Bug 371722] Mono array initialization 10x slower than .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 17 12:25:31 EDT 2008


User lupus at novell.com added comment

--- Comment #4 from Paolo Molaro <lupus at novell.com>  2008-03-17 10:25:30 MST ---
Marek, of course adding more calculations won't help, in fact I didn't ask you
to add more calculations, I asked you to write benchmarks so that the results
of the calculations are used (ie generate a jit-invisible side effect). Without
this the numbers are meaningless because they measure something, but you don't
know what.

I should likely write a small guide on writing benchmarks, since this is a very
common mistake to make (another being reporting a timing without specifying the
cpu the program was ran on, the operating system and how many times it was ran
and if it was averaged, how).

The issue is that your numbers look very inconsistent and in that case it's
important to look at the details. For example, here are my findings on a core 2
duo 2.4, linux.
The test takes 2.75 seconds, best of several runs, I deduce your system is
about 25% slower than mine.
If BaseToString() is changed to just do the allocation, it takes 0.96 seconds
(this doesn't match Zoltan's results: in my case about one third of the time is
due to allocation and GC).

The equivalent java 1.6 program that does only the allocation takes 0.32 (this
is consistent with several results also from the MS CLR: alloc-only benchmarks
are 3 times faster than mono and the .net GC and java's GC are mostly
equivalent). With the 25% slowdown of your box, it would mean that java doing
just the allocation would be slower than .net (and the complete program takes
0.7 seconds, which would become 0.87 on your box, so ~2.4x slower).
This result is inconsistent with your numbers and is consistent with all the
previous results we had, so one of the likely options is that the benchmark as
written doesn't measure what you think it measures. There may be also other
issues in your numbers (like running mono on windows: performance in that case
has no relevance).

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list