News for hackers. Stuff that matters.
Re:Low-Latency, High-Throughput Garbage Collection [pdf] by pjmlp on Monday April 25, 2022 @11:47AM (#31156531)
No matter how productive, high level languages will always cause a performance knock-on effect by kicking useful stuff out of instruction cache and internal registers.

Yet they are useful.

Re:Low-Latency, High-Throughput Garbage Collection [pdf] by titzer on Monday April 25, 2022 @02:47PM (#31159031)
What high-level language feature causes inherently increased register pressure?
Re:Low-Latency, High-Throughput Garbage Collection [pdf] by pjmlp on Monday April 25, 2022 @03:22PM (#31159435)
Assembly allows to use all of them, and there is no need to reserve any for ABI, other than syscalls or specific opcode requirements.

On high level languages one needs to hope that the register allocator does a good job.

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.
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.

Re:Low-Latency, High-Throughput Garbage Collection [pdf] by sebastianconcpt on Monday April 25, 2022 @01:52PM (#31158357)
Right, the cost of maintaining systems would be exponentially high for a marginally irrelevant gain on an edge case.
Re:Low-Latency, High-Throughput Garbage Collection [pdf] by pjmlp on Monday April 25, 2022 @02:00PM (#31158454)
Developer salary per hour * time developing the feature * time spent bug fixing * number of team members + hardware infrastructure cost