Linked by Thom Holwerda on Sat 8th Oct 2005 18:40 UTC, submitted by anonymous
Java Programmers agonize over whether to allocate on the stack or on the heap. Some people think garbage collection will never be as efficient as direct memory management, and others feel it is easier to clean up a mess in one big batch than to pick up individual pieces of dust throughout the day. This article pokes some holes in the oft-repeated performance myth of slow allocation in JVMs.
Thread beginning with comment 43069
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[12]: MMM steaming Java!
by japail on Tue 11th Oct 2005 06:02 UTC in reply to "RE[11]: MMM steaming Java!"
japail
Member since:
2005-06-30

> How many times do I have to say I was not referring to
> Java.

How many times do I have to tell you that he lodged his criticism at the output of javac? What you're talking about is, well, stupid because it's obvious. Any optimizing C compiler will perform the optimization he pointed out with sufficiently-aggressive optimizations enabled. No, no compiler has to perform the optimization. Your insight is truly amazing. No compiler has to perform the optimization with annotations, either. Would you like a Captain Obvious Award with the Refuses to See the Point Because He's a Java Zealot Special Mention?

And yes, javac is primitive. And large amounts of optimization is only practical using static analysis, because the computational overhead at runtime is prohibitive. Much as many specializations are more practical at runtime, because profiling information is available.

Go back to using the preprocessor to conditionally exclude C code based upon the usage pattern of local variables.

Reply Parent Bookmark Score: 1