473,427 Members | 1,755 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,427 software developers and data experts.

Speed Test c# vs. c++

hi

i'm looking for a speed test of c# vs. c++.
the test should be representative for mass data production.
it should also include IO operations.

can anybody give me a good link from the internet?
thanx jazper.
Nov 16 '05 #1
6 11126
Hi Jazper,

Are you asking in terms of managed vs. unmanaged code? Also, C# vs. what
version of C++? C# and managed C++.NET both compile down to the same MSIL
code and execute in the CLR, so the speed test would be equal. (I'm not sure
if unmanaged C++.NET compiles down to IL though).

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Jazper Manto" <ej*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
| hi
|
| i'm looking for a speed test of c# vs. c++.
| the test should be representative for mass data production.
| it should also include IO operations.
|
| can anybody give me a good link from the internet?
| thanx jazper.
|
|
Nov 16 '05 #2
> Are you asking in terms of managed vs. unmanaged code? Also, C# vs. what
version of C++? C# and managed C++.NET both compile down to the same MSIL
code and execute in the CLR, so the speed test would be equal. (I'm not sure if unmanaged C++.NET compiles down to IL though).


nono, i meant C++ of VS 6.0.
i only found a link 2 minutes ago:
http://www.kuro5hin.org/print/2002/6/25/122237/078
however are there any better ones.
Nov 16 '05 #3
I found these links:

http://www.tommti-systems.de/go.html...enchmarks.html

http://www.osnews.com/story.php?news_id=5602&page=3

C++ 6.0 is usually faster than C#, but, speed is not the only consideration
of going with C# and .NET in general.

Check this out:
http://msdn.microsoft.com/library/de...eenccsharp.asp

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Jazper Manto" <ej*****@hotmail.com> wrote in message
news:O0*************@tk2msftngp13.phx.gbl...
|> Are you asking in terms of managed vs. unmanaged code? Also, C# vs. what
| > version of C++? C# and managed C++.NET both compile down to the same
MSIL
| > code and execute in the CLR, so the speed test would be equal. (I'm not
| sure
| > if unmanaged C++.NET compiles down to IL though).
|
| nono, i meant C++ of VS 6.0.
| i only found a link 2 minutes ago:
| http://www.kuro5hin.org/print/2002/6/25/122237/078
| however are there any better ones.
|
|
Nov 16 '05 #4
> C# and managed C++.NET both compile down to the same MSIL
Untrue? I was under the impression that MC++ can be faster than C# because
the C++ front-end performs many global & peephole optimizations that are not
in C# yet -- these get carried over to the generated CLR.

If there is much blocking I/O in your program (as you suggest) then you
probably won't notice much difference.

In my (unscientific) tests, C# came in at about 2x slower than C++ -- which
I consider to be fantastic.
IMHO, any reasonable (YMMV) slowdown is worth the price in dev-time and
safety.
(In contrast, Python was a few hundred times slower than C++ -- even then,
Python is pretty nice and I could have optimized away most of the
hot-spots.)

m
"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Jazper,

Are you asking in terms of managed vs. unmanaged code? Also, C# vs. what
version of C++? C# and managed C++.NET both compile down to the same MSIL
code and execute in the CLR, so the speed test would be equal. (I'm not sure if unmanaged C++.NET compiles down to IL though).

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Jazper Manto" <ej*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
| hi
|
| i'm looking for a speed test of c# vs. c++.
| the test should be representative for mass data production.
| it should also include IO operations.
|
| can anybody give me a good link from the internet?
| thanx jazper.
|
|

Nov 16 '05 #5
"Mike" <vi********@yahoo.com> wrote in message
news:e3***************@TK2MSFTNGP10.phx.gbl...
|> C# and managed C++.NET both compile down to the same MSIL
| Untrue? I was under the impression that MC++ can be faster than C# because
| the C++ front-end performs many global & peephole optimizations that are
not
| in C# yet -- these get carried over to the generated CLR.

I did some research on this. MC++ does compile down to MSIL. But, the C++
compiler in .NET can optimize the resulting IL [way] above and [way] beyond
what the C# compiler can do (poor little C# compiler... lol). The resulting
IL from MC++ is smaller and faster than the IL made by the C# compiler.
There are more switches for the C++ compiler than in the other compilers
(although, most of these are for unmanaged C++, they still *somehow* apply
to the MC++) which is why, IMHO, MC++ is faster than C#.

I think the biggest benefit of MC++ over C# is just that you can take your
existing C++ code, slap it into VS.NET and recompile it with the /clr switch
and it works. Now, obviously it's not a catch all, but 90% of the time, that
is the case.

| If there is much blocking I/O in your program (as you suggest) then you
| probably won't notice much difference.

True. :-)

| In my (unscientific) tests, C# came in at about 2x slower than C++ --
which
| I consider to be fantastic.
| IMHO, any reasonable (YMMV) slowdown is worth the price in dev-time and
| safety.
| (In contrast, Python was a few hundred times slower than C++ -- even then,
| Python is pretty nice and I could have optimized away most of the
| hot-spots.)

Yeah, while C# is slower (although, I haven't really noticed any of my C#
apps running all *that* slow), it is much, much safer than unmanaged C++ is,
especially in the hands of newbies ;-). I think there is a pretty good trade
off between C#'s safety and C++'s ability to do just about anything.

| m
|
|
| "Kyril Magnos" <ky**********@yahoo.com> wrote in message
| news:%2****************@TK2MSFTNGP12.phx.gbl...
| > Hi Jazper,
| >
| > Are you asking in terms of managed vs. unmanaged code? Also, C# vs. what
| > version of C++? C# and managed C++.NET both compile down to the same
MSIL
| > code and execute in the CLR, so the speed test would be equal. (I'm not
| sure
| > if unmanaged C++.NET compiles down to IL though).
| >
| > --
| > HTH
| >
| > Kyril Magnos
| > "I'm not a developer anymore, I'm a software engineer now!" :-)
| >
| > "Jazper Manto" <ej*****@hotmail.com> wrote in message
| > news:%2****************@TK2MSFTNGP11.phx.gbl...
| > | hi
| > |
| > | i'm looking for a speed test of c# vs. c++.
| > | the test should be representative for mass data production.
| > | it should also include IO operations.
| > |
| > | can anybody give me a good link from the internet?
| > | thanx jazper.
| > |
| > |
| >
| >
|
|
Nov 16 '05 #6
hi Kyril
I found these links:

http://www.tommti-systems.de/go.html...enchmarks.html

thank you. this one is really cool!
j.
Nov 16 '05 #7

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

Similar topics

13
by: Yang Li Ke | last post by:
Hi guys, Is it possible to know the internet speed of the visitors with php? Thanx -- Yang
13
by: Jordanakins | last post by:
Usenet, I am currently working on my website and am needing to detect the connection speed of the client. I would like to do this in PHP and not use any other languages. This makes it a bit more...
2
by: m004202002 | last post by:
I recently visited a site http://us.mcafee.com/root/speedometer/default.asp which find out the connection speed . Can any body explain how(logic) to do it ? Can i do that using php ? Please help...
29
by: Bart Nessux | last post by:
Just fooling around this weekend. Wrote and timed programs in C, Perl and Python. Each Program counts to 1,000,000 and prints each number to the console as it counts. I was a bit surprised. I'm not...
2
by: Dr. Peer Griebel | last post by:
Hi, I have a class with some properties. I would like to verify that only valid values are assigned to the properties using assert. Therefore I code setters and getters and use property() to...
6
by: J. Campbell | last post by:
Hi everyone. I'm sure that this is common knowledge for many/most here. However, it was rather illuminating for me (someone learning c++) and I thought it might be helpful for someone else. I'm...
30
by: Mike Cox | last post by:
Hi. I recently ran a benchmark against two simple programs, one written in Java and the other in C++. The both accomplish the same thing, outputting "Hello World" on my screen. The C++ program...
6
by: Dennis | last post by:
I was trying to determine the fastest way to build a byte array from components where the size of the individual components varied depending on the user's input. I tried three classes I built: (1)...
11
by: Sezai YILMAZ | last post by:
Hello I need high throughput while inserting into PostgreSQL. Because of that I did some PostgreSQL insert performance tests. ------------------------------------------------------------ --...
3
by: Chris288 | last post by:
Hi, I have a problem where our app when compiled in VS2005 runs about 50% the speed it attains in VS2003. This is an unmanaged C++ app. I have tried most combinations of the optimization and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.