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.
Since this is seemingly a byte code or threaded code based VM, your code execution probably also contributes to cache exhaustion.