[nylug-talk] Why does "enterprise" imply "Java"?

Michael Bacarella
Mon Jul 10 12:17:58 EDT 2006


On Mon, Jul 10, 2006 at 11:47:37AM -0400, David Rosenstrauch wrote:
> Michael Bacarella wrote:
> >On Fri, Jul 07, 2006 at 03:20:37PM -0400, Felix Shnir wrote:
> >>Eric, the myth of Java's slowness has been floating around since
> >>release 1.0and it highly exagurated...  Lets just say the things
> >>changed in the Java
> >>1.4 - 1.5 world...  Consider revising your strategy or at least attempting
> >>some pilots.
> >
> >So what am I doing wrong?
> 
> >$ time java -classpath . stillslow
> >
> >real    0m2.404s
> >user    0m0.031s
> >sys     0m0.031s
> 
> 
> >$ time ./stillfast
> >
> >real    0m0.828s
> >user    0m0.796s
> >sys     0m0.031s
> 
> 
> You're comparing apples to oranges.

FINALLY someone called my bluff.

...
> Run a more sensible long-running test where an initial 2-second start-up 
> delay isn't relevant and Java will be comparable - if not better.  How 
> could it be better?  Because that same "hot spot" just-in-time compiler 
> lets Java take advantages of optimizations at run-time that are 
> impossible in C/C++.

Yes, we've all heard how theoretically awesome this HotSpot technology is, but
apparantly it still has a ways to go because even the antiquated old-news
barbarian GNU C Compiler was smart enough to see:

	for (i = 0; i < 1000000000; i++)
		;

and figure out it was a long winded way of saying:

	i = 1000000000;

Whereas the JRE chewed through that loop a billion times, although I'm assured
that thanks to advanced HotSpot JIT magic that has never really been explained,
it happened as efficiently as possible.



More information about the nylug-talk mailing list