- Published on
Investigation · Part 9 of 10 · Types under the hood
Runtime Type Tags: What Dynamic Languages Keep That Static Ones Throw Away
A Python integer with the value 1 takes 28 bytes, and a million of them cost 36 MB where Rust would use 4. I expected mixed arrays to be slow in V8 and they were not. The cost that did show up was object shape, and it arrives as a cliff at the fifth shape.