News for hackers. Stuff that matters.
Re:Go does not need a Java-style GC by pkolaczk on Wednesday November 24, 2021 @12:08PM (#29332277)
I don't know the exact reason here, but from my experience JVMs don't seem to perform optimisations as deep as static compilers. You can see the compiler not only missed scalar replacement here, but also didn't use a conditional move to avoid branching neither it performed any loop unrolling. Maybe it is because JITs are constrained by time and resources a lot more.
Re:Go does not need a Java-style GC by chrisseaton on Wednesday November 24, 2021 @12:46PM (#29332755)
It'd be worth doing a deep dive into this - you can look at the compiler's intermediate representation to understand why it didn't make an optimisation. There may be something trivial getting in the way.