3 ms·
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
by sreque 10y ago
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.
- geodel 10y agoGo uses quite a bit less memory than Java. http://benchmarksgame.alioth.debian.org/u64q/go.html http://benchmarksgame.alioth.debian.org/u64q/go.html
- pjmlp 10y agoDue to value types support, which are part of Java 10's roadmap.
- geodel 10y agoI'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.
- SureshG 10y agoAs 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 https://www.infoq.com/presentations/java-se-9-cloud - check this presentation for more details.
- geodel 10y agoImpressive numbers.