473,698 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1669
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**********@h otmails.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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**********@h otmails.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.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
2461
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, callable(*args)) return proxy which, is functionally equivalent to
44
2611
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 twisted. - An easy to use tool for drawing diagrams, typically various kinds of arrows and circles and boxes, that produces nice .eps and .svg files.
7
1940
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 ratio of 393 to 1. Is this normal for Python, or does Flex produce better parsers than Pylly? I have been looking at the code produced by Flex to see if I could translate it to Python automaticly. But it has a lot of goto statements, and I...
2
620
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 the whole thing at > <ftp://ftp.eskimo.com/u/s/scs/C-faq/faq.Z> > Apparently it's the most up-to-date version available. Well its plain text, and it is contiguous, which is a lot better than my 331 html files totalling 982kB, but up to date it...
5
2040
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
271
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 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...
11
1629
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 patterns in each number (or in fact 32 bit row, of which a few (leftmost) are bogus). Speediness of execution is high on the priority list. I thought of a solution along these lines, avoiding relatively slow switch/case or several if/elseif...
10
1928
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 secrets exposed to casual inspection via MSIL. VB6 doesn't do this to me, whereas, if I read Balena correctly, VB2005 always will. The one single and only issue holding up my migration is this matter of IP security, and I'm sorry folks but no...
4
1887
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 used something like a xenocode compiler to convert to native code. I hear things like the xenocode option only makes a minor speed improvement in startup.
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8873
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.