Would it possible to write a JIT compiler that addresses cache misses and cache locality by paying attention to how it lays out heap allocations vs the order it's used in? I don't know if it's feasible, but it seems like it could work for a subset of situations.