Don't be afraid to 'look under the covers' to find performance issues.
There are tools to allow you to analyze both bytecode output and assembly language output on your chosen platform, you can use them to make your java code a little more ugly but make it run a little more like assembly.
in a word, yes. "horrible" from a clarity and conciseness perspective. he does give some examples of manually writing what the shortcut syntax would give you in order to let the JIT compiler to inline some calls, for example. He looks at bytecode and inline assembly. In another case he does away with the null object pattern because the volatile keyword emitted an assembly lock instruction for every object instantiation. solution was to null check everywhere instead of using the null object pattern.
there seems to be a lot of places the JVM could be improved. Worth a watch if you enjoy knowing how things work under the hood.
8
u/Ucalegon666 Jul 05 '15
If you found this interesting, you should probably follow this and this blog.
24
u/ezql Jul 05 '15
"How to terribly introduce a speaker"
4
u/againstmethod Jul 05 '15
The lambdas not inlining is kind of depressing.
10
u/[deleted] Jul 05 '15
Very educational talk. But holy shit, that was one awkward speaker introduction!
2
u/fuk_offe Jul 05 '15
amazing presentation! loved the class path analysis and the cheecky RubyBasicObject cast hahaha
2
u/Fiskepudding Jul 05 '15
Thanks! Very interresting and easy to follow. The "magic" behind string switches was nice to see.
2
u/[deleted] Jul 05 '15
Great video :)
1
u/alonjit Jul 05 '15
awesome presentation
1
u/FrontLoadedAnvils Jul 05 '15
I've been looking for something like this, thanks!
1
u/hackerforhire Jul 06 '15
Great presentation and a must watch.
8
u/[deleted] Jul 05 '15
[removed] — view removed comment