Managed vs Unmanaged Bare Bones Performance Test

L

Lloyd Dupont

Unfortunately I reformat my hard drive since then...
Anyway, for the record, I found this page
http://www.shudo.net/jit/perf/#scimark2

With various performance test.

Other than that I had a heated discussion on the lounge
(www.codeproject.com/lounge.asp) at the time, on the topic.
With all C++ afficionados swearing to me that C++ is waaaayyyy faster and
telling me that GCC is well known for producing slow code.
it's when a C++ evangelist compile it with MS compiler and produced the
result..
I haven't produce them my self, having some trouble compiling plain C with
VS sometimes.... :-(


--
Regards,
Lloyd Dupont
NovaMind Software
Mind Mapping at its best
www.nova-mind.com
 
J

Jon Skeet [C# MVP]

Lloyd Dupont said:
Unfortunately I reformat my hard drive since then...
Anyway, for the record, I found this page
http://www.shudo.net/jit/perf/#scimark2

With various performance test.

Showing various results - although only using .NET 1.1, I notice. I
don't know how much performance difference there is between 1.1 and
2.0. It would also be interesting to look at the C#, given that it was
ported from the Java (at least for Linpack). It could be that it was a
perfectly good port - or it could be that they made all the methods
virtual, to be a direct port. That could have a significant impact on
performance.
Other than that I had a heated discussion on the lounge
(www.codeproject.com/lounge.asp) at the time, on the topic.
With all C++ afficionados swearing to me that C++ is waaaayyyy faster and
telling me that GCC is well known for producing slow code.
it's when a C++ evangelist compile it with MS compiler and produced the
result..

Yes, there are numerous tweaks that make benchmarking C++ harder, of
course. Is it valid to apply an optimisation which you know is safe for
the particular code you're using, but would be unlikely to be safe on a
general application? Should we just use Visual Studio defaults? It's
interesting to know the results of all kinds of combinations, of
course.

The comparison I found most interesting was the Linpack one, comparing
the 1000x1000 (where C# did very well - just 5% behind C++) with
500x500, where .NET trailed behind Mono. (I believe the "interpreter"
part of the good Mono result is a typo, given that there's no JIT
entry.) I suspect there are cache effects changing things significantly
there, but it's hard to be sure. C++ certainly takes the lead
significantly in the 500x500 test. I've downloaded and run the code
myself, and I get fairly consistent figures for various different
sizes, so I'm slightly suspicious of the result. (It doesn't help that
it's timing such short times, of course.)

Having said that, even in that pretty abysmal test, C++ isn't the
"twice as fast" which is sometimes claimed.
I haven't produce them my self, having some trouble compiling plain C with
VS sometimes.... :-(

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top