Hacker News new | ask | show | jobs
by modeless 617 days ago
If the memory layout is fixed and fields are untyped then every field must be at least 8 bytes to potentially hold a double precision floating point value. There would clearly be value in adding typing to restrict field values to 1 or 2 or 4 byte integers to allow packing those fields. But I can see that it would add complexity.
1 comments

Only if your implementation holds doubles without boxing them. V8 boxes doubles, but JSC and SpiderMonkey do not.