Earlier quoted context omitted.
The especially nasty thing about that boxing pressure is that when I still paid attention to the JVM, they had some sort of cache for boxing of numbers under about 128, which meant that if you did tests with toy inputs, identity checks would pass in code that needed an equality check instead, and benchmarks built the same way would see no GC pressure in those call trees but see quite a lot of pressure in production.…
isn't that kinda how python preallocates integers -5 to 256? https://docs.python.org/3/c-api/long.html#c.PyLong_FromLong
Sounds like it. I wasn't familiar with how python does this but it looks like the identity operator is 'is' so while someone could definitely screw that up, it would stick out more in a code review than == versus ===