3 ms·
Memory compression should handle any repeating initializer. I think they stuck with 0x0 because it keeps the performance of any calloc()-using object allocator
by syncsynchalt 4y ago
Memory compression should handle any repeating initializer.
I think they stuck with 0x0 because it keeps the performance of any calloc()-using object allocator the same (just moves the "when" of zeroing the chunk).
- syncsynchalt 4y agoAnswering myself: there's also an ARM opcode for zero'ing memory. That's another reason to use 0x0.
- acdha 4y ago> Memory compression should handle any repeating initializer. That’s what I’d think, too, but I wouldn’t be shocked if someone said they had some implementation detail which made it easier to work with zeroes. I know ARM has pretty good performance zeroing memory but that’s exactly the kind of thing where their hardware team might optimize what is now an extremely common operation.