By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,286 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,286 IT Pros & Developers. It's quick & easy.

.NET vs Mono performance

P: n/a

I've just done some quick performance tests using various medium-sized
benchmarks and it appears that .NET is vastly faster than Mono. Can anyone
confirm this?

For example, my ray tracer benchmark from the shootout (in C#):

32-bit .NET: 13s
64-bit Mono: 123s

I was expecting Mono to be maybe 2x slower but 10x is very disappointing.

--
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Apr 9 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Jon Harrop <jo*@ffconsultancy.comwrote:
>
I've just done some quick performance tests using various medium-sized
benchmarks and it appears that .NET is vastly faster than Mono. Can anyone
confirm this?

For example, my ray tracer benchmark from the shootout (in C#):

32-bit .NET: 13s
64-bit Mono: 123s

I was expecting Mono to be maybe 2x slower but 10x is very disappointing.
I think it would be worth doing performance tests on more similar
equipment - tests on different architectures aren't very easily
comparable.

Also bear in mind that your bottleneck may be something that the Mono
JIT does particularly badly - it's effectively impossible to get a
"general" benchmark, as every application will have slightly different
bottlenecks.

Having said all that, I agree it's disappointing.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 9 '07 #2

P: n/a
Jon Skeet [C# MVP] wrote:
I think it would be worth doing performance tests on more similar
equipment - tests on different architectures aren't very easily
comparable.
These are identical machines:

2x 4400+ AMD64 (2.2GHz)
2Gb RAM
GF7900GT

The only difference is the software (64-bit Linux, 32-bit Windows). If
anything I'd expect 64-bit to give the advantage to Mono.
Also bear in mind that your bottleneck may be something that the Mono
JIT does particularly badly - it's effectively impossible to get a
"general" benchmark, as every application will have slightly different
bottlenecks.
Yes. Any idea what the problem might be? Perhaps Mono is swamped by 64-bit
pointers, but that would only explain another factor of 2.

--
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Apr 9 '07 #3

P: n/a
Jon Harrop wrote:
The only difference is the software (64-bit Linux, 32-bit Windows). If
anything I'd expect 64-bit to give the advantage to Mono.
I'd actually expect the opposite, due to reduced effective cache size
because of larger pointers and less maturity in compilation experience &
effort.

-- Barry

--
http://barrkel.blogspot.com/
Apr 9 '07 #4

P: n/a
Barry Kelly wrote:
>The only difference is the software (64-bit Linux, 32-bit Windows). If
anything I'd expect 64-bit to give the advantage to Mono.

I'd actually expect the opposite, due to reduced effective cache size
because of larger pointers and less maturity in compilation experience &
effort.
I've only ever seen one benchmark get worse going from 32- to 64-bit and it
was an allocation intensive tree-based algorithm. In general, 64-bit is
much faster, particularly for FP intensive work like this ray tracer.

--
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Apr 9 '07 #5

P: n/a
Jon Harrop wrote:
Barry Kelly wrote:
The only difference is the software (64-bit Linux, 32-bit Windows). If
anything I'd expect 64-bit to give the advantage to Mono.
I'd actually expect the opposite, due to reduced effective cache size
because of larger pointers and less maturity in compilation experience &
effort.

I've only ever seen one benchmark get worse going from 32- to 64-bit
Specifically using the Mono JIT compiler? Not all compilers are created
equal by dint of targeting the same architecture, alas.
and it
was an allocation intensive tree-based algorithm. In general, 64-bit is
much faster, particularly for FP intensive work like this ray tracer.
I think you need to isolate your variables and test Mono on Win32.

FP on x64 is completely different from x86 - specifically x87 isn't
there, there's no FP stack etc. FP codegen needs a rewrite for x64.
Perhaps it hasn't been paid due attention yet for Mono/x64?

-- Barry

--
http://barrkel.blogspot.com/
Apr 9 '07 #6

P: n/a
Why not test windows mono against .net on same machine and OS? At least
that way, you eliminate the 32/64 issue and the OS issue and can get closer
to apples-to-apples tests on library perf.

--
William Stacey [C# MVP]
"Jon Harrop" <jo*@ffconsultancy.comwrote in message
news:46**********************@ptn-nntp-reader02.plus.net...
|
| I've just done some quick performance tests using various medium-sized
| benchmarks and it appears that .NET is vastly faster than Mono. Can anyone
| confirm this?
|
| For example, my ray tracer benchmark from the shootout (in C#):
|
| 32-bit .NET: 13s
| 64-bit Mono: 123s
|
| I was expecting Mono to be maybe 2x slower but 10x is very disappointing.
|
| --
| Dr Jon D Harrop, Flying Frog Consultancy
| OCaml for Scientists
|
http://www.ffconsultancy.com/product...ex.html?usenet
Apr 9 '07 #7

P: n/a
Barry Kelly wrote:
>I've only ever seen one benchmark get worse going from 32- to 64-bit

Specifically using the Mono JIT compiler?
No, that was OCaml (which is more pointer-intensive than most languages).
Not all compilers are created equal by dint of targeting the same
architecture, alas.
True.
I think you need to isolate your variables and test Mono on Win32.

FP on x64 is completely different from x86 - specifically x87 isn't
there, there's no FP stack etc. FP codegen needs a rewrite for x64.
Perhaps it hasn't been paid due attention yet for Mono/x64?
Yes, that's a very good point. I hadn't thought of it like that. Actually, I
didn't even know you could get Mono for Windows.

However, I'm really interested in .NET on Windows vs whatever on Linux and,
currently, I think that "whatever" has to be Mono.

--
Dr Jon D Harrop, Flying Frog Consultancy
OCaml for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Apr 10 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.