top | item 45479602

(no title)

sbinder | 4 months ago

I don't think the runtime is "much more advanced", the JVM has had most of these optimizations for years.

discuss

order

grumpyprole|4 months ago

The JVM famously boxes everything though, probably because it was originally designed to run a dynamic language. An array list of floats is an array list of pointers. This created an entire cottage industry of alternative collections libraries with concrete array list implementations.

ysleepy|4 months ago

A float[] is packed and not a list of pointers in the jvm.

An ArrayList<Float> is a list of pointers though.

vips7L|4 months ago

They're famously working on changing that. I think we're all hopeful that we'll start seeing the changes from Valhalla roll in post-25.

dtech|4 months ago

Almost none of this is in the JVM. Escape analysis is extremely limited on the standard JVM, and it's one of GraalVM's "enterprise" features. You have to pay for it.

doikor|4 months ago

> one of GraalVM's "enterprise" features. You have to pay for it.

Free for some (most?) use cases these days.

Basically enterprise edition does not exist anymore as it became the "Oracle GraalVM" with a new license.

https://www.graalvm.org/faq/