Re:Low-Latency, High-Throughput Garbage Collection [pdf]
by titzer on Monday April 25, 2022 @04:31PM
(#31160196)
Ha, well. I just spent a fair bit of time writing an interpreter in assembly and hand-optimized the regalloc to the limit. But I was surprised by my competitors written in C and how well gcc, in particular, could regalloc hairy interpreter loops. Compilers are very good at register allocation at the right granularity; they just generally don't do it across procedures.
[ Parent
| on HN ]
Re:Low-Latency, High-Throughput Garbage Collection [pdf]
by zozbot234 on Monday April 25, 2022 @04:39PM
(#31160295)
> they just generally don't do it across procedures.
They won't do it for extern (i.e. separately compiled) calls, because the ABI wouldn't really allow for anything of the sort. But calls to static (or inline) procedures that only have visibility within a single source file can occur with arbitrary calling conventions, so the compiler is free to optimize register allocation across procedures.
Re:Low-Latency, High-Throughput Garbage Collection [pdf]
by pjmlp on Tuesday April 26, 2022 @02:10AM
(#31164508)
Sure it is a matter of how good the regalloc algorithm is, and how many registers are there to play with.
My point was more about how we are willing to trade the optimal performance for something that gets us there most of the time, while offering much more productive tooling.