Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you include idiomatic Java programing as part of sloppy programming I also agree with that.

https://www.cs.virginia.edu/kim/publicity/pldi09tutorials/me...



Many things pointed out in this article apply to just about every managed language runtime. Implement a TreeSet in any language and you'll see the same overhead from object headers, memory alignment, etc. Java has some oddities that cause it to waste extra memory, but off the top of my head the only I can think of is 16-bit character Strings. Java 9 is supposed to help with that by allowing Strings to internally store utf8 characters.

I do like the slide though showing that people tend to assemble abstractions together and completely lose sight of the performance costs of what they are doing. There's also the fallacy commonly held by many that because someone took the time to write a framework or library, they must have also taken the time to ensure it's optimized well.


Go uses quite a bit less memory than Java.

http://benchmarksgame.alioth.debian.org/u64q/go.html


As per the Specjbb benchmark, JDK9 compact strings optimization itself provides,

  * 21% memory footprint reduction
  * 27% less GC
  * 5% throughput improvments
https://www.infoq.com/presentations/java-se-9-cloud - check this presentation for more details.


Impressive numbers.


Due to value types support, which are part of Java 10's roadmap.


I'd imagine it will be at least 5 years away when most popular Java software use this feature and java users see the effect of this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: