| ▲ | drob518 4 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||
Yep, and sometimes just a small code change can flip on boxing. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | cogman10 4 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||
One of my least proud (most proud?) hacks when working with very large data sets is something like this
This is a terrible thing that shouldn't be as useful as it is to us... but it is really useful. We have a bunch of objects that can optionally have Integer values (hence a null is valid) but those int values are frequently the same.This saves a bunch of memory and ultimately GC pressure as a result. Valhalla can't come soon enough for us. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||