JVM Anatomy Quarks

  • https://shipilev.net/jvm/anatomy-quarks/17-trust-nonstatic-f... is a damned shame. User code misses out on an important optimization available only to system-provided classes because certain frameworks have abused JNI and reflection to mutate final fields, which by all rights should be immutable.

    Platforms, especially compilers and runtimes, need to be absolutely strict in enforcing semantic restrictions so as to preserve optimization opportunities for the future.

  • Tangential: Apple has a new Swift Java bridge which is pretty cool, supporting both JNI and Panama. I’ve been porting it to Android this past week.

    https://github.com/swiftlang/swift-java

  • Happy to see this gem shared here. I've learnt a lot about the JVM going through these.

    This article about the "stack allocation" misnomer in Java in particular is one of my favorites: https://shipilev.net/jvm/anatomy-quarks/18-scalar-replacemen.... What the JVM really does is escape analysis + scalar replacement.

  • I love the "size" of these posts. Kinda neat to just read through one in a few mins and maybe run the bench locally.

  • If you work for a few years with JVM based languages this set of articles are so interesting! I remember reading through these for the first time several years ago.

  • Does anyone know why the name of this series was changed from ‘JVM Anatomy Park’?

  • I’ve basically forgotten about Java. It would never occur to me to start a new project in it. Am I the only one? It feels like I’d reach for python if I want fast development and flexibility, Go if I want to handle a bunch of I/O concurrency in a garbage collected way, Swift if I want a nice language that’s compiled and balanced, or Rust if I want performance and safety in a compiled language. Those are just my personal leanings. I know kotlin has made Java more ergonomic, and yet….