top | item 45480327

(no title)

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.

discuss

order

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.

grumpyprole|4 months ago

Arrays have a static fixed size though, making them far less useful in practice. Anything one builds with generics is boxed. Dotnet doesn't have this problem.

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.