4 ms·
Python's "int" optimization of pre-allocating objects for values between -5 and 256 can be a great source of fun when writing extensions, too. Same mechanism,
by h2odragon 3y ago
Python's "int" optimization of pre-allocating objects for values between -5 and 256 can be a great source of fun when writing extensions, too.
Same mechanism, overwriting the value stored in the allocated object; but when the extension is in loose C code which is casting pointers with abandon... things can go wrong.