Project Lambda: Java Language Specification draft

Neal Gafter neal at gafter.com
Thu Jan 28 11:11:46 PST 2010


On Thu, Jan 28, 2010 at 10:55 AM, Reinier Zwitserloot
<reinier at zwitserloot.com> wrote:
>>  my NetBeans compiles pretty fast too, indeed both compilers are now
>> I/O-constrained on any recent machine/JVM, so this is not anymore a good
>> case study.
>>
>
> So, javac vs. ecj is no longer a good case study? Huh? No, it _IS_ a good
> case study, it is serious anecdotal avidence that that micro-optimization,
> which is what ecj has done, does not help performance any, and instead makes
> a dog of a code base that is such a drag on maintainability and flexiblity
> that eclipse is legendary for lagging behind new java features so much.

Reiner: have you actually looked at the javac code base?  It's got
lots of micro-optimizations.  For the most part, they were done
because the changes made a significant difference in compile-time.  I
think the more likely explanation of the lag in language features is
that Sun and others use javac (not ecj) to prototype new language
features.

By the way, looping through an ArrayList using indexing happens to be
faster than looping through using an iterator because the latter
requires two method calls per element, while the former requires only
one.  It's not hard to verify this experimentally.  Had the for-each
loop been library-defined, it could have been changed to a more
efficient implementation in later releases.



More information about the coin-dev mailing list