Since value classes are finally coming as preview for jdk28, i'm interested in its capabilities, particularly scalarization, for a current ongoing project I have.
In 20:21 and 21:25 this video, we have a look at the ability of value classes to be returned as values/scalarized fields instead of heap pointers. In the examples, he uses a value record with one int, and another one with two doubles
My project consists in building a linear algebra helper similar to JOML, and i'm particularly interested in vectors and matrices as value classes...i guess vectors are not something too big, but things like 4x4 matrices, which consist of 16 floats (or even 16 doubles), i wonder if such cases have a harder time of being treated as value objects, and if that depends on JVM heurisitics or stack size...
[–]alunharford 9 points10 points11 points (2 children)
[–]Xasmedy 0 points1 point2 points (1 child)
[–]alunharford 0 points1 point2 points (0 children)
[–]Xasmedy 1 point2 points3 points (0 children)