News for hackers. Stuff that matters.
Re:Go does not need a Java-style GC by altfredd on Tuesday November 23, 2021 @08:17PM (#29325878)
Scalar replacements (as currently implemented in Java) does not work in real-world programs.

Well-written code does not need it. Poorly written code can not trigger it, because the JIT is too dumb and isn't getting better.

There is no sane test to determine whether a piece of code will be inlined in Java. In practice anything more complex than byte array is unlikely to be inlined. Even built-in ByteBuffers aren't! Meanwhile Go compiler treats Go slices just as nicely or better than arrays.

Re:Go does not need a Java-style GC by native_samples on Wednesday November 24, 2021 @06:27AM (#29328913)
The JIT is getting better. Major escape analysis upgrades are a big part of where Graal (a drop-in replacement for the HotSpot JIT) gets its performance boosts. EA definitely does work well there because Truffle depends on escape analysis and scalar replacement very heavily. GraalVM CE is better than regular HotSpot at doing it and GraalVM EE is even better again.
Re:Go does not need a Java-style GC by altfredd on Wednesday November 24, 2021 @07:27AM (#29329307)
Graal effort is over 10 years old.

Jaotc, — Graal's sole mainstreamed part, — has been recently removed from OpenJDK in 17th release, and Oracle says [1], that they are "considering the possibility of using C2 for ahead-of-time"

1: https://mail.openjdk.java.net/pipermail/discuss/2020-Novembe...

Re:Go does not need a Java-style GC by kaba0 on Wednesday November 24, 2021 @12:01PM (#29332168)
It’s almost as if graal and openjdk are separate projects with different use cases. Also, they are not competing (in the usual meaning) since both are developed by Oracle.
Re:Go does not need a Java-style GC by pjmlp on Wednesday November 24, 2021 @05:54AM (#29328765)
Which JIT? There are plenty of them to choose from across Java implementations.