|
Here's the problem: Companies use libraries (MFC, etc) to add functionality to C++, but it also serves the purpose of making it hard to port to other platforms. This means it can take six months or more of CODE changes to port an application from Windows to Macs. Compiled Java allows developers to write for ALL platforms at once -- without a SIX MONTH rewrite. Instead, it takes the time of a recompile. And if its compiled natively, you can get around the problems of slow execution speed (although native compilers still need some work) -- because its in native format, not bytecode. That's the point of compiling Java to native format -- and it's a very good one!
|
|
|
|
|
I am not myself a Java fan. I dont even know how to set the classpath
But your post makes sense to me.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
Christian Graus wrote:
Are you saying that if you looked at a C# program and a Java program, had no way of comparing their speed to each other and an equivelant C++ program, you wouldn't notice any similarity ?
Huh? I'd expect the C++ program [normal C++, not the managed one] to run a lot faster if it is a complex enough program with respect to speed of execution.
But both the C# written prog and the Java prog would be slow enough, for me to even think of using it in a time-complex situation.
You missed my point - I was saying speed is hardly the only point of comparison. What someone said below notwithstanding, in general C# LOOKS like Java. That is my point - speed is not the only are that C# and Java are similar.
Of course C++ is faster.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
Of course C++ is faster.
And better..
Sonorked as well: 100.13197 jorgen
|
|
|
|
|
I think that MC++ should be used to make "glue" components, that will interoperate with both managed and unmanaged code. For everything else in .NET world, I see no reason to use MC++; it compiles to IL, therefore it's no faster than C# (although I didn't compare them, so it's only my guess).
The good combination IMHO is:
1. On the server side, ASP.NET with C# or ATL Server.
2. On the client side, unmanaged C++ (MFC, WTL, whatever). CLR is too slow for client-side apps.
I vote pro drink
|
|
|
|
|
At the moment the C++ compiler is the only MS .NET compiler that is optimisated, therefor similar C# and C++ source code may produce different IL.
cheers,
Chris Maunder
|
|
|
|
|
Chris
I dont know about the optimization.
But even my programs written using MC++ ran slower than a similar program written using MFC.
The exe takes a 2 second load time before it even comes up on screen.
Dunno why.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
So run it a second time.
If the .NET CLR isn't loaded before a program using the .NET framework is run then the framework must be first loaded and initialised. The second time a program is run this load time is not needed.
Also: which version are you running (a beta or the RTM?). .NET is released Wednesday so I would LOVE for someone to post some realistic and varied benchmarks on various facets of .NET (I/O, memory, calcs, GUI etc)
cheers,
Chris Maunder
|
|
|
|
|
Chris Maunder wrote:
If the .NET CLR isn't loaded before a program using the .NET framework is run then the framework must be first loaded and initialised. The second time a program is run this load time is not needed
Cool! Thanks for that info.
Chris Maunder wrote:
Also: which version are you running (a beta or the RTM?)
.NET beta 2.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
You can also try running ngen on your executable/dll, that does the JIT for you.
James
Sonork ID: 100.11138 - Hasaki
"My words but a whisper -- your deafness a SHOUT.
I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
What does it do? Convert CLR binaries to native binaries?
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Sort of; one of the features of the CLR is to be able to tell it to re-JIT a method (according to John Lam anyway ). To do this when a method is JIT'd its vtable pointer is simply replaced with the location of the JIT'd method; before the JIT they all point to a stub method which tells the CLR to do the JIT.
I'm basing this on what I've gleaned from the DOTNET mailing list, and I just woke up so I probably have some info wrong :-P.
James
Sonork ID: 100.11138 - Hasaki
"My words but a whisper -- your deafness a SHOUT.
I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
C# will not be the language of choice if You have any interest
in execution speed. C# is ok for GUIs and some networking
requests, but not for big apps.
So far I have not seen any usable Java program except in web
browsers. Corels Office suite has never been finished because
the performance is extremely poor.
Recent tests in a computer magazine state that the speed of C#
is comparable to Java. No wonder, the concepts behind both
are quite similar.
I give managed C++ a very good chance to become the most popular
next generation language. The mixing of managaned and unamanaged code
makes migration very easy plus the managed part runs only slightly
slower than unmanaged code. Code reuse and extensibility are nearly
unlimited because of the very rich existing C++ sources already avaliable.
|
|
|
|
|
Interesting..
akraus wrote:
Recent tests in a computer magazine state that the speed of C#
is comparable to Java
Do you have any link you can post?
|
|
|
|
|
Anonymous wrote:
akraus wrote:
Recent tests in a computer magazine state that the speed of C#
is comparable to Java
Do you have any link you can post?
maybe if its a web magazine
Everyone welcome the NewbiE!!!!
First Programmer: "How many bits are in a bite?"
Second Programmer: "You spelled bytes wrong."
First Programmer: *stares* "It's a joke, moron."
Second Programmer: "Joke...?"
|
|
|
|
|
The magazine emphasizes that Microsoft does not allow performance
tests before the final release of .NET. So they only said,
that preliminary tests indicate that the speed of C# is comparable
to Java. And no I will not name the name of the law braking magazine.
Too many Microsoft employees out there
|
|
|
|
|
akraus wrote:
And no I will not name the name of the law braking magazine.
Too many Microsoft employees out there
If that's the case, then the magazine has broken the law already, and thus you shouldn't worry about what you do as a magazine reader..
|
|
|
|
|
Sorry I have no link. You have to go to the store and buy it.
And You must be able to read german
The magazine is c'T Computer Technik Magazin and definitly one
of the best avaliable. German press has still some high quality
magazines which have competent and independent editors.
|
|
|
|
|
This is dumb.
1/ Why would you expect accurate results from tests on a beta ?
2/ How can M$ stop people from doing performance tests ?
3/ How does doing what M$ doesn't want constitute breaking the law ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
2/ How can M$ stop people from doing performance tests ?
They can't stop them, but by doing so you break your EULA with using the software, thus losing your license causing your further use of it to be illegal.... If you live in a country that abides by EULAs that is.
Christian Graus wrote:
3/ How does doing what M$ doesn't want constitute breaking the law ?
See above
James
Sonork ID: 100.11138 - Hasaki
"My words but a whisper -- your deafness a SHOUT.
I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
James T. Johnson wrote:
They can't stop them, but by doing so you break your EULA with using the software, thus losing your license causing your further use of it to be illegal.... If you live in a country that abides by EULAs that is
You can post an anonymous "speed test results".
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
<small><b><B><I>C</B>hristian <B>G</B>raus</I> wrote:
</b></small><i>1/ Why would you expect accurate results from tests on a beta ?</i>
Yes!!! Java is like beta-software reliability, so surely it's a fair test???
<flame suit on>
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Anonymous wrote:
Do you have any link you can post?
Ya, good question. It wasn't long ago that Chris posted an article here about some benchmarks done by Microsoft which proved that C#/.NET was significantly faster than Java/J2EE.
Regards,
Alvaro
Behind a beautiful woman there's usually a guy who just couldn't wait to get rid of her.
|
|
|
|
|
The Petstore sample??
check out this interesting thread:
http://www.theserverside.com/discussion/thread.jsp?thread_id=9797
|
|
|
|