On 05/02/2013 12:55 PM, Barry Roberts wrote:
> On Thu, May 2, 2013 at 12:08 PM, Sasha Pachev<[email protected]>  wrote:
>> Barry's comment proves the point that Java is not really that fast for
>> development time.
>>
> All it proves is that I'm not willing to spend any time with a
> contrived benchmark.  I've worked in Java projects with dozens of
> developers and over half a million lines of code.  That code can run
> hundreds of threads for months at a time.  If a null pointer is
> dereferenced, only one thread has a problem (the whole process doesn't
> core dump), it doesn't leak memory, it is almost invulnerable to stack
> and buffer overflow security issues, and it performs very well.  All
> of that comes with at least an order of magnitude less effort in
> planning and correlating on the part of developers than if it were
> written in C or C++.  Just because an irrelevant benchmark doesn't
> prove something doesn't mean it proves the opposite.

This discussion has raised a few questions in my mind about Java vs ??? 
efficiency.  For one, I thought the JIT would be re-optimizing long 
before the first 100,000 loops of an instruction set.  Is that typical?

If that kind of runtime is required to get the JIT to optimize, I wonder 
if most programs don't benefit at all from the JIT.  My impression is 
that Java is used most heavily as the middle-tier business logic in web 
apps, and maybe in Android apps (yes, it's a rash generalization).  Most 
of those apps are not going to get 100,000 runs on any significant part 
of the code base before it is patched by the authors and re-deployed, 
crashes, or is shutdown to deal with problems of power, heating, and 
hardware upgrade.  So what value is the JIT?  Does the JVM store any 
information at exit about how the classes ran so that at some point a 
section of code might be optimized?

Most code I can think of that would have tight loops needing 
optimization involves hardware drivers, but Java's definitely not the 
write tool for that job.  Is there some other area that Java performance 
shines that I'm overlooking?

Don't get me wrong, I'm partial to Java, though I haven't used it in my 
own coding for years.  However, my opinion has soured recently from 
general experience using various Java apps on various platforms.  I like 
the language in particular and the API documentation, but overall, it 
seems the various JVMs fragment memory heavily, killing cache-line 
performance over time.  With that in mind, it seems most of the JIT 
benefits are a wash.

Grazie,
;-Daniel Fussell

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to