3 ms·
> Integers from -127 <-> 127 The cache can be extended on startup with env var `java.lang.Integer.IntegerCache.high ` https://github.com/openjdk/jdk/blob/cc27
by agilob 2mo ago
> Integers from -127 <-> 127
The cache can be extended on startup with env var `java.lang.Integer.IntegerCache.high `
https://github.com/openjdk/jdk/blob/cc278dbb8a1ca0754d5842708b9029441055d361/src/java.base/share/classes/java/lang/Integer.java#L927 https://github.com/openjdk/jdk/blob/cc278dbb8a1ca0754d584270...
- pwagland 2mo agoThat is a nice piece piece of knowledge! We have an Integer cache in our product, and the only reason that it hangs around is that it caches 0..1024 instead of -127..128. By setting this value, we could simplify our code, ever so slightly.