24 ms·
JVM doesn't know about generic types at the runtime. There's no specialization of HashMaps, it's just arrays of points to objects all around. With project Valh
by eonwe 10y ago
JVM doesn't know about generic types at the runtime. There's no specialization of HashMaps, it's just arrays of points to objects all around.
With project Valhalla: https://en.wikipedia.org/wiki/Project_Valhalla_(Java_language) https://en.wikipedia.org/wiki/Project_Valhalla_(Java_languag... there's been talk about specialization for value types.
- enitihas 10y agoI too thought the same. That's why pcwalton's comment confused me.
- pjmlp 10y agoIt is already available for those that want to play with it. https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/content/en/openjdk-projects/valhalla.html https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-starte...