This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi, my question is why java very slow but still gain huge population by software company? is there any specific reason for it ?
i myself actually prefer java because it is really object-oriented but other than this , i have to agree , java is very slow as compare asp, php specially in web application processing, can anyone please guide me on this ? how do i persuade customer to use java product ? thank you !
Hi alvin , Well your question is a valid one that java is slow but that is just one aspect of seeing it.Besides this it has some real advantages that makes it preferrable..One of the adv. u have said that it is an OBJECT ORIENTED language..Secondly it is supported on mutilple platforms..like LINUX and UNIX.. while ASP etc are not supported on such platforms and the trend today is going towards LINUX and UNIX servers for web applications where JAVA would be handy ..This was just one simple example and besides this there are lot many examples which would surely convince you that it is the best ... not just u and me use java I hope i have given you something as your answer that would convince you,.. Luk always, Saurabh
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Where's the sudden influx of "Java is slow compared to XXX" coming from?
Compared to ASP and PHP Java/JSP is anything BUT slow, in fact it's quite a bit faster. Of course if I am an experienced ASP or PHP hacker who knows all the performance tricks out there and I try to rewrite something in JSP of which I know nothing it is likely that the JSP will turn out to underperform, but that can hardly be blamed on Java but rather on the person writing it...
Joined: Jan 08, 2004
jeroen, i'm not to offence java , i like java very much in fact, just cannot stand on situation, when some of my friends and colleague mentioned on how nice of c# for window, how fast of php as web application language, and this thing make me think over and over again, how to answer customer, java application have better advantage over others, besides ,
jeroen, u agree java faster than other ? but frankly, i still feel it slower than say c++ ..correct me if i get wrong perception...thank you !
Joined: Oct 12, 2000
C++, compiled and highly optimised towards its intended single hardware/software platform, SHOULD be faster than Java which is optimised for platform independence. But then, Assembly is faster still (at least potentially) and raw machine code is fastest of all.
Yet many people no longer program in Assembly, preferring C++ instead. From personal experience I can tell you C can be up to 10 times faster than C++, Assembly maybe 2-3 times faster than C. All that for basically the same code.
At some point what counts more is time to market. The C++ program of those 3 options would be the fastest to create and maintain and likely contain the least bugs (thus reducing support cost). Java is an order of magnitude better yet than that while the performance penalty is NOT an order of magnitude greater. So unless performance is of paramount importance (such as in highly intense number crunching code) using Java can give the customer an economic advantage. In addition they won't need to maintain separate codebases for most or all of their code in order to support new hardware and software platforms. This too can be a major benefit.
Of course if there's only a single platform that ever needs supporting and the application will be tightly bound to that platform anyway (say direct hardware access) there are better choices than Java and C++ is certainly one of them (though I'd still consider pure C).
But on average, I don't think that for most applications (especially enterprise applications like web applications that have no graphical user interfaces they need to directly display) there is little or no performance impact on using Java except slightly slower initial loading times (and that relative, considering that a servlet or JSP is loaded once during server lifetime while a cgi script has to be loaded from disk every time it is called thus causing loading times for those to be actually longer than those for servlets after the first call).
Please post the results of your time studies that support this assertion. Or perhaps you have a documented study that proves this?
If not, this is a fallacy and will be considered a troll.
And even if you could prove this assertion, do you think that the difference would be perceptible to the end user? I think not. The rendering time for a page is noise compared to network and database overhead.
"Java is slow" is the kind of dumb statement we used to get back in the days of JDK 1.02 - are these friends and colleagues in a time warp or something? Or is this yet another "astroturf" desperation attempt by the .NET crowd? You can write a slow application in any language - just use a poor algorithm. Go away trolls. Read this recent benchmark page. Bill [ May 25, 2004: Message edited by: William Brogden ]
Joined: Jan 08, 2004
william , thank for article to prove java faster, now i can print it out and show peoples....how java perform sink to other , ...i be great that you share me this information .
Joined: Jan 08, 2004
and then i found java editor written in java slower than java editor written in c++ ..what are all friend's comments here ?
no matter how fast you are, there is always someone faster. There is also someone always slower.
As has been pointed out... you might use a 'fast' language/runtime/platform combination, and still turn out a *slow* application of that technology. Let's say for the sake of argument that java *is* the fastest language out there. This sort of absolute statement is pretty much impossible, for *many* reasons. But let's take it on faith for a bit.
Does "the fastest language ever" necessarily guarantee that you will write a performant program?
If you have a program specification, and you code exactly 100% of that spec (not 98%, not 103%) in two languages, one being java ("the fastest") and one being "program language foo.net" (the "other guy")... isn't it possible to produce a foo.net application that performs better than the java one?
What if the programmer did something stupid like:
Now that's a ridiculous example, but I think you get my idea. Any program, written in any language, can die the death of a thousand tiny cuts. Those tiny cuts are otherwise known as:
- poor architecture - unnecessary object overhead - memory 'leaks' and related phenomenon - not optimizing - using inappropriate algorithms
the list really goes on. [ May 25, 2004: Message edited by: Mike Curwen ]
Author and all-around good cowpoke