473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

I wasn't expected that !

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/marche...nchmark_01.htm

JM
Nov 15 '05 #1
3 1261
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" <ma*****@comcast.net> wrote in message
news:m8********************@comcast.com...
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/marche...nchmark_01.htm

JM

Nov 15 '05 #2
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" <ma*****@comcast.net> wrote in message
news:m8********************@comcast.com...
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/marche...nchmark_01.htm

JM

Nov 15 '05 #3
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 :-)

--
JM
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: 2L | last post by:
Trying to write some code and this is just shitting me now! Bit of form validation stuff.... Variable is declared as follows..... --snip-- <script language="JavaScript"> <!---
5
by: andy.herrera | last post by:
I'm getting this Error Message. Expected ';' Please Select One: <form name="form1"> <<------------ Error is here. <select name="selectTrans" onChange="If (this.value == 'checkout')...
35
by: Marchel | last post by:
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...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
9
by: rhaazy | last post by:
Using MS SQL 2000 I have a stored procedure that processes an XML file generated from an Audit program. The XML looks somewhat like this: <ComputerScan> <scanheader>...
7
by: Warrax | last post by:
I am currently doing online tutorials for C++, and am pretty much stuck in a rut about this problem. It is saying that there's an expected unqualifed-id before '{' token (I will post the code in just...
1
by: JOJO123 | last post by:
I got here in search of an answer to this Javascrpt question. I upgraded jave on XP Ie 7, acrobat 5.1 and suddenly can't open any pdf files on web sites using IE. I see u guys all say, this is a...
10
by: preeya | last post by:
Hi, I have written the following program: ------------------------------------------------------------------------------------------------------------- 1 #include <stdio.h> 2 #include...
0
by: =?Utf-8?B?ZWdzZGFy?= | last post by:
Hi, I have created a second gridview when customer clicks on select link with this code: Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As...
9
by: erictheone | last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.