Hacker News new | past | comments | ask | show | jobs | submit login

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_languag... there's been talk about specialization for value types.




It is already available for those that want to play with it.

https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-starte...


I too thought the same. That's why pcwalton's comment confused me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: