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

Optimizing JavaScript in practice can be very, very hard.

This is a very good observation. I think we're getting to the point where designers of languages and programming environments should start paying attention to the programmer cost/benefit trade-offs around optimization. It doesn't matter what language it is, if performance is critical, and your application is well used, you will get to the point where you'll have to optimize.

Optimizing a managed language with garbage collection is hard. JIT and Generational GC tends to make optimization especially hard. Rust takes an approach without GC. Golang has GC, but makes it easy to avoid creating memory pressure.



Back when Java came into scene, all major GC enabled systems programming languages had support for value types, some kind of off-heap allocation, some of them also had generics and were AOT compiled to native code.

But then the way it was massively marketed meant those languages died, with Eiffel and Oberon being the only two that are still kind of around, but they are pretty niche.

Thankfully .NET designers learned the lesson and kept value types, some ways of manually allocating, AOT compilation at installation time, reified generics, but "it's Microsoft" meant many did not explore this path.

Java is now trying to fix these bad decisions.

In a way Go is what Java 1.0 should have been.




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

Search: