The motivation for the Valhalla project (https://openjdk.java.net/projects/valhalla) came from the fact that, since Java was first introduced almost 25 years ago, the hardware has changed and the decisions made at that time would have a different outcome today. For example, the operation of getting a value from memory and an arithmetic operation incurred roughly the same cost in terms of the performance time. Nowadays, the situation has changed. The memory access is from 200 to 1,000 times longer than an arithmetic operation. This means that an operation that involves primitive types is much cheaper than the operation based on their wrapping types.
When we do something with two primitive types, we grab values and use them in an operation. When we do the same operation with wrapper types, we first use the reference to access the object (which is now much longer...