33 ms·
> switch-based bytecode VMs I am finding a switched byte interpreter to be very expedient on my computer. It seems that if the # of cases is kept small enough,
by bob1029 2y ago
> switch-based bytecode VMs
I am finding a switched byte interpreter to be very expedient on my computer. It seems that if the # of cases is kept small enough, your chances of getting a good branch prediction can go up substantially. Something like a brainfuck interpreter runs extremely fast. In the worst case of randomly guessing, you are still going to time travel with a 12.5% success rate.
- josefx 2y ago> In the worst case of randomly guessing, you are still going to time travel with a 12.5% success rate. Random guessing clearly isn't the worst case then, a bad prediction can miss every single time.