Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ...
by paulddraper on Friday December 30, 2016 @09:17PM
(#13289046)
> Why then don't people write in Java for performance?
They do. Just like people write for PyPy for performance.
The only challenge to Java's performance is from languages without dynamic GC and with detailed static type information: C, C++, Rust. Even then, Java is usually "only" half the speed.
And AOT is coming for fast start-up, not good steady-state performance.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ...
by rictic on Friday December 30, 2016 @08:35PM
(#13288910)
The things that make Java slow compared to C++ aren't in the compiler so much as in the language. In a sentence, Java made tradeoffs for productivity and simplicity that in C++ went in favor of performance and power.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ...
by CalChris on Friday December 30, 2016 @09:17PM
(#13289045)
Well, back in the day, the Sun people were crowing that HotSpot would be faster than C++.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ...
by andars on Friday December 30, 2016 @05:50PM
(#13288205)
Lots of people do write in Java for performance. It is all relative.
JIT performance benefits are highly dependent on the language.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ...
by munificent on Monday January 02, 2017 @08:54PM
(#13306055)
Performance of generated code for Java is actually pretty fantastic. As far as I know, most of the performance ceiling now is because pointer indirection and cache misses. Java's "everything is a reference to a heap-allocated object" model is nice for simplicity, but it's very expensive in today's world where you really don't want to fall down the memory hierarchy.
JITs have been around for 30+ years and they're umm OK. As in not magical.