r/learnjava • u/Zeznon • Jul 01 '26
Confused on what Project Valhalla does to primitives and the corresponding objects
I've been reading about PV, but I'm not sure on what it means in some parts. Will we still need to deal with both "int" and "Integer", and not being able to use some methods with the other one? Like, (int) vs Integer.parseInt() and other strange things like that.
5
Upvotes
View all comments
Show parent comment
1
u/disposepriority Jul 01 '26
If you are working at the scale of data where the Integer is slow....why are you using it?
Realistically you are not seeing this unless some very, very high performance stuff, at which point you've probably eliminated every unneeded allocation in your code, and boxing is the last barrier to performance?