logoalt Hacker News

vbezhenartoday at 4:19 PM1 replyview on HN

Why should compiler optimize obviously dumb code? If developer wants to create billions of heap objects, compiler should respect him. Optimizing dumb code is what made C++ unbearable. When you write one code and compilers generates completely different code.


Replies

carlmrtoday at 4:39 PM

The problem is rather that Java doesn't have generics and structs, so you're kind of forced to box things or can't use collections.