473,394 Members | 1,769 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.

Runnig at Native speed...Dream or reality ?

I can't ignore the speed of .NET managed applications in manipulating
string, I/O and arithmetic operations. However, we can never compare the
speed of a C/C++ program with its .NET counterpart when it comes to some
heavy operations, like long loops, graphics, load time and many other
issues.
The dream is; having an intermediate language (IL) run in the virtual
machine at the speed of an unmanaged code. Java has in many ways solved this
issue and their performance is sometimes cool, special in their latest VM.
We can't also ignore the performance of .NET , but to be honest, we are
still far from that goal of reaching the speeds of light.
Any guys here can give us more facts about the future of VMs and their
performance? (esp. .NET I mean)

Jul 21 '05 #1
3 1641
main(){}; wrote:
I can't ignore the speed of .NET managed applications in manipulating
string, I/O and arithmetic operations.
The actual I/O is done in native code so you should not see much
performance degrade from that.

Most string operations should be pretty fast in C#, especially since the
strings are immutable, so you don't need any locking in threaded apps.
For repeated concatenation, use the StringBuilder clsas, and things
should be pretty fast.

Finally, if you have critical parts of your system using the major part
of resources, you can implement those parts in unmanaged code and easily
(have you tried JNI?) use those from .NET langauges.
However, we can never compare the
speed of a C/C++ program with its .NET counterpart when it comes to some
heavy operations, like long loops, graphics, load time and many other
issues.
Actually, in theory the .NET runtime could simply compile the IL code to
the same code as a c++ compiler would with the c++ source. How far
MSVC's C# compiler does optimizations like those is not known to me.
The dream is; having an intermediate language (IL) run in the virtual
machine at the speed of an unmanaged code. Java has in many ways solved this
issue and their performance is sometimes cool, special in their latest VM.
My current perception of the MSVC CIL runtime excution is that it is a
lot faster on many operations, and certainly much more memory efficient
that current JVM's from Sun. I have no test-programs to back up this
perception, do you have any to back up yours? if you do, I would like to
see them so I can have a better understanding of the strengths and
waknesses of the two runtimes.
We can't also ignore the performance of .NET , but to be honest, we are
still far from that goal of reaching the speeds of light.
Any guys here can give us more facts about the future of VMs and their
performance? (esp. .NET I mean)


Perhaps you could write a few test-programs that demonstrate the
specific problems have? Perhaps someone can help you to write a faster
implementation.

--
Helge
Jul 21 '05 #2
You're talking about this as if the .NET IL code is being interpreted all
the time, but it's not, it's compiled to native code and runs native.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
"main(){};" <it**********@hotmails.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I can't ignore the speed of .NET managed applications in manipulating
string, I/O and arithmetic operations. However, we can never compare the
speed of a C/C++ program with its .NET counterpart when it comes to some
heavy operations, like long loops, graphics, load time and many other
issues.
The dream is; having an intermediate language (IL) run in the virtual
machine at the speed of an unmanaged code. Java has in many ways solved
this
issue and their performance is sometimes cool, special in their latest VM.
We can't also ignore the performance of .NET , but to be honest, we are
still far from that goal of reaching the speeds of light.
Any guys here can give us more facts about the future of VMs and their
performance? (esp. .NET I mean)

Jul 21 '05 #3
I'd agree with the other posters, I don't think the speed differential's
that large. The only reason we've compiled some code into native C++ is that
it interfaces with libraries that were unhappy being compiled as managed.
Initially we were going to compile a lot of our maths code unmanaged, but
the difference in speed was neglibible so in the end, we didn't bother. We
have the same code running as pure native code in another test harness and
it doesn't seem any slower, though I don't have comparison figures.

Steve

"main(){};" <it**********@hotmails.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I can't ignore the speed of .NET managed applications in manipulating
string, I/O and arithmetic operations. However, we can never compare the
speed of a C/C++ program with its .NET counterpart when it comes to some
heavy operations, like long loops, graphics, load time and many other
issues.
The dream is; having an intermediate language (IL) run in the virtual
machine at the speed of an unmanaged code. Java has in many ways solved
this
issue and their performance is sometimes cool, special in their latest VM.
We can't also ignore the performance of .NET , but to be honest, we are
still far from that goal of reaching the speeds of light.
Any guys here can give us more facts about the future of VMs and their
performance? (esp. .NET I mean)

Jul 21 '05 #4

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

Similar topics

34
by: Jacek Generowicz | last post by:
I have a program in which I make very good use of a memoizer: def memoize(callable): cache = {} def proxy(*args): try: return cache except KeyError: return cache.setdefault(args,...
44
by: Will Stuyvesant | last post by:
Suppose you have the time and the money to start a new project in Python. What would you like to do? I can think of: - A civilization like game in Python, with multiplayer support via...
7
by: Peter Kleiweg | last post by:
I implemented a lexer in Pylly and compared it to the version I had written in Flex. Processing 219062 lines took 0.9 seconds in C (from Flex), and 5 minutes 54 second in Python (from Pylly), a...
2
by: Paul Brown | last post by:
Thanks for various responses - my feeling is that the cost benefit ratio is now approaching the noise level asymptote, though there was at least one good point : > compressed plain-text copy of...
5
by: JJ | last post by:
Can anyone point me to a place where I can use a custom action within a C# setup project to generate a native image on the target machine during installation? Thanks!
3
by: main\(\){}; | last post by:
I can't ignore the speed of .NET managed applications in manipulating string, I/O and arithmetic operations. However, we can never compare the speed of a C/C++ program with its .NET counterpart...
11
by: Schraalhans Keukenmeester | last post by:
I have a substantial random stream of (numerical, long int) data (coming from several SCADA sources) that needs to be passed thru a function that tallies the occurrences of several different bit...
10
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
Hi all, Playing VS2005 was more fun than Doom III, and I do enjoy my games. Anyway, it's back to work for me and I'm bogged down in my familiar VB6 stomping grounds because I don't want my...
4
by: Peted | last post by:
hi, im wondering if there is a definitve answer to this. If you build a winforms/wpf application in vs2008, when you have compiled and run the app, does it run as fast (in general) as if you...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.