2 ms·
I’m wondering if all values are boxed, like in Python, which is increasing RAM usage and creating a lot indirections, instead of being able to create arrays and
by ngrilly 4y ago
I’m wondering if all values are boxed, like in Python, which is increasing RAM usage and creating a lot indirections, instead of being able to create arrays and structs where the members are located in the same block of contiguous memory.
- exebook 4y agoValues seem to be nan-boxed, which means numbers are simply doubles and therefore will still be located in the same block of contiguous memory. When the higher 8 bits are FF the remaining 48 normally are an indirection pointer. So right, for anything other than numbers your cache misses increase, but storing dynamically sized objects like strings or tuples or maps continuously in array is a hard problem anyway not to mention storage in maps or in tables. Since this is seemingly a byte code or threaded code based VM, your code execution probably also contributes to cache exhaustion.