News for hackers. Stuff that matters.
Re:ARM64 and You by revelation on Friday September 27, 2013 @03:00PM (#6458834)
CPython has reference counts as a part of the object in memory. The claims of "large memory consumption" are nonsense, especially since small integer objects and strings are aggressively interned.

And increasing just one aligned integer is certainly cheaper than the bit masking the solution here entails (all of which is neatly hidden away in the 'increment of the correct portion' part).

Re:ARM64 and You by mikeash on Friday September 27, 2013 @07:55PM (#6460285)
Remember that this decision was made back when the entire system might have 32MB of RAM. Does CPython even fit in that, as a single process, let alone a full multitasking UNIX?

Additional RAM consumption has costs of its own, in terms of cache usage. Adding an extra 8 bytes for every object in the system is not insignificant. Masking and shifting is extremely cheap.

If you've run the benchmarks and can show your approach is better, by all means, please share.