I wasn't expected that !

M

Marchel

For a long time I was a gib fan of Borland C++ Builder with VCL framework and never gave a second look in Microsoft
products since I've seen MFC. Anyway, recently Borland decided out of the blue to abandon it's C++ Builder and I decided
to give a look into the .NET C++ and .NET C# products. After briefly playing with them I put them to test against each
other in some floating point tasks. The outcome might surprise you. It certainly surprised me !

See for yourself:

http://mywebpages.comcast.net/marchel/en/benchmark/benchmark_01.htm

JM
 
B

Bonj

With reference to the C++ test (benchmark_03.htm), the results you got ARE
what I would have expected. 3 months ago, I wouldn't have said that was the
case, but then someone told me about the concept of 'cache misses' and 'page
faults'. It all apparently relates to the fact that there are not just 2
areas of memory on a computer as many people think (hard disk, slow access
but massive space, and RAM, fast access but small space). There is actually
a third - processor cache (very fast access but tiny space). Apparently the
more localized variables are, the more likely they are to be stored in the
processor cache when needed again. This makes the C++-style of code you have
in example 2 more localized, because the loop is actually a declarative
region of its own, in which some variables are defined which means the
compiler knows they won't be used outside of that area.
(Apparently! :) )

Marchel said:
For a long time I was a gib fan of Borland C++ Builder with VCL framework
and never gave a second look in Microsoft
products since I've seen MFC. Anyway, recently Borland decided out of the
blue to abandon it's C++ Builder and I decided
to give a look into the .NET C++ and .NET C# products. After briefly
playing with them I put them to test against each
 
B

Bonj

a) What optimization settings did each of the compilers have when you
compiled the tests?

b) Try something else:
Plot a graph of the last modification time of the compiler's executable
files, against a speed measure. I bet there's a correlation, even when
considered independant of compiler author.



Marchel said:
For a long time I was a gib fan of Borland C++ Builder with VCL framework
and never gave a second look in Microsoft
products since I've seen MFC. Anyway, recently Borland decided out of the
blue to abandon it's C++ Builder and I decided
to give a look into the .NET C++ and .NET C# products. After briefly
playing with them I put them to test against each
 
M

Marchel

All three compilers had "release" settings with all optimizations available under IDE switche to "speed". I normally
don't run compiler from the command line. If the setting is not available in IDE it "doesn't" exist for me :)
 

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