SCUA

News

Entity code now runs at full JIT speed

August 10, 2026

The natural way to write game entities is a list of records: es[i].x = es[i].x + 1 over an array of { x, y, vx, vy } things. Until this week that natural shape never reached the optimizing tier, and could run several times slower than the same logic restructured into parallel plain arrays. The fastest way to write SCUA was the ugliest, which we considered a bug in the language's values even though every benchmark was technically telling the truth.

Records-in-a-list now compiles on both architectures. The new entity-loop benchmark runs about 3.4 times faster on x86-64 and 2.7 times faster on ARM64 than it did, which puts it level with LuaJIT on the same workload. The restructuring trick is retired: write the entity loop the way it reads best, and the compiler's job is making that fast.