Re:Squeezing a Little More Performance Out of Bytecode Inter...
by kaba0 on Monday June 19, 2023 @12:48AM
(#36387412)
I wrote that interpreter roughly a year ago — my computer is definitely not the most up-to-date (the CPU is an intel i5-4690), but I would be surprised if the difference would have disappeared.
Also, I don’t think that it could even in principle be efficiently branch predicted — you are basically doing a memory read, jump conditionally based on that, jump back, do another memory read vs memory read, jump there, memory read, jump there. There is one less jump involved here, so any form of improved branch prediction would also enhance this second form as well.
I found this, you might be able to benchmark it yourself if you have better hardware: https://github.com/vshymanskyy/interp
Re:Squeezing a Little More Performance Out of Bytecode Inter...
by ghusbands on Monday June 19, 2023 @01:01AM
(#36387473)
Even if it were only the same speed on current gen hardware, most users are on older hardware, anyway, so it would still be a win unless it actually reduced performance.
Re:Squeezing a Little More Performance Out of Bytecode Inter...
by hinkley on Monday June 19, 2023 @03:40AM
(#36388358)
That was pre COVID news, if not more on the order of five years ago. Although now that I think of it, with Spectre and Meltdown mitigations perhaps the clock has been turned back on those improvements.
Do you have benchmarks on current gen hardware that suggest that the code complexity results in a measurable difference in outcomes?