blasphemy!Originally Posted by Wraithan
blasphemy!Originally Posted by Wraithan
Aside from I/O system speed, the above tests also reflect the JVM startup overhead, which will always be there, and always become insignificant on any real tests.
That's why you do performance measuring inside the program, not outside.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Well IMHO it doesn't matter which is faster if I can just display "Hello World!" fast enough.
ERROR: Brain not found. Please insert a new brain!
“Do nothing which is of no use.” - Miyamoto Musashi.
My instructor this past fall claimed that an equivalent program that was originally written in C++ is actually faster when written in Java. So should I strangle him?
-Capt
No, just the people who wrote the original C++ program
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
lol, well since he was saying ANY C++ program we better start strangling ourselvesOriginally Posted by CornedBee
That is what my instructor was implying so we're in trouble.Originally Posted by Laserve
well, it's completely retarded to say things like that. He probably just likes java more because he was too incompetent to learn C++ completelyOriginally Posted by CaptainMorgan
actually, you're probably quite accurate. He is a Java programmer by trade and was forced to teach C++ this past semester by the dept head.Originally Posted by Laserve
Moved to the comedy store since it's degenerated into a "yeah but" argument.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I'm really not going into the debate of which is faster, C++ or Java.
So, you can stop reading now.
There's a strong attitude from Java programmers towards C++. Not all, but a sizeable number. Sizeable enough to probably become representative.
I'm not really sure why. Maybe because the syntax is similar. Maybe because bot languages can be used to solve the same problems on most programming domains. There's simply an aversion towards C, and especially C++. And traditionally, the argument that gets always debated, is that of speed. I'm not surprised though. There's also the same strong attitude from most C or C++ programmers towards programming languages the likes of Visual Basic or Delphi, for instance. It reveals the same ignorance. No one is perfect and C++ programmers are certainly not an exception.
That programmers, some of them being professional programmers, actually discuss speed as an argument for which is a better programming language is overwhelmingly sad. It is really the state of things. They learn nothing in the University, and they learn even less in the work place where the few remnants of a sane programming culture of the 80s and 90s is quickly be thrown to the waste bin.
Except for performance critical applications, or applications dabbling in those few areas still in existence today where computational power is still in high demand (3D, for instance), speed is of no concern. None whatsoever. In fact, as CornedBee pointed out, speed concerns have the power to turns against the programmer and create a much harder to maintain application or even a buggy one.
It's an ignorant thing to say that one language is better than another because its faster. And under most circumstances it is even ignorant to try and compare languages based on speed. Programming languages are certainly meant to be fast. Of course. It would be ridiculous otherwise. But today's performances on most top programming languages is very agreeable to the demands of most applications. The differences are minimal and for most applications (and I mean a way lot, darn it!) one can concentrate on other much more important aspects of the programming language; Can it be used to solve my problem? Does it have the right tools? Will it take me more or less time to solve my problem? Will it allow me to quickly maintain my code? etc...
Speed? Speed is for whiners!
Last edited by Mario F.; 01-10-2007 at 07:43 AM.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I don't know... Maybe it is only my bad luck?.. But... I have to support some suite of applications... Ok we have some agents that should work in RT and speed is essential... (have we tried 4 CPU Intel Server,... yeah... sadly it is not enough... Let's try to split more...) So here is no question how essential speed is...The differences are minimal and for most applications (and I mean a way lot, darn it!) one can concentrate on other much more important aspects of the programming language; Can it be used to solve my problem? Does it have the right tools? Will it take me more or less time to solve my problem? Will it allow me to quickly maintain my code? etc...
But on the other hand we have a report generator. Let's forget about speed and concentrate on... what was that? "Can it be used to solve my problem? Does it have the right tools? Will it take me more or less time to solve my problem? Will it allow me to quickly maintain my code? etc" Yes... it works fine, till it goes to some customer that want to generate report for his simulation that was running during a month... And he does not want to wait 3-4 hours till the report will be build (he is not intrested to know what number of Megabytes to be parsed to generate report, he just wants to get the report in minutes, not hours)...
so no, I don't have any application to support, where the time issue is not critical... Bad luck?
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
I would agree with you 100% if not for the fact that you're only looking at your own domain.Originally Posted by Mario F.
The speed issue is no issue at all anymore on desktop and client/server applications.
For instance, I had to make a big web application (on windows) a few years ago in which the customer demanded a certain performance. Like 20 web requests a second should be possible and 1 request involved parsing parameters, a database lookup, transform the results via xml/xsl to html and send back to browser. All that in 50ms you say, thats impossible! Of course not, we didnt have to look at all at code performance because if the application turned out to be too slow another server was added. In the end we ended up with 6 servers put behind a load balancer with the webserver tweaked for performance and all that crap. Performed like a maniac!
Where I dont agree with you is that I code gambling machines (on video) now on an m68k processor with a bit crappy videocard to say the least. Coding without regard to performance is just not possible. You will meet the system boundaries all too soon and you will find yourself constantly in a battle against the processor/amount of memory.
Could be historical. Java was created as "a better C++". Quite literally.Originally Posted by Mario F.
I don't think there's a precedent for this situation: where one language that was from the beginning meant to be "better" than another gained a sizeable following, but the original language survived, too. That would explain why there's so much hate between the two camps.
Personally, I simply enjoy that knowing both languages is so little additional hassle, and use both, whichever I happen to need at the moment. (My primary domain currently being web applications, that's all too frequently Java.)
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law