Runnig at Native speed...Dream or reality ?

M

main\(\){};

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)
 
H

Helge Jensen

main(){}; said:
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.
 
P

Phil Wilson

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.
 
S

Steve McLellan

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top