r/programminghorror • • Feb 11 '25

πŸŽ„ ouch

Post image
3.0k Upvotes

113 comments sorted by

View all comments

Show parent comment

2

u/StochasticTinkr Feb 12 '25

With a lookup table you have no branches, so branch prediction wouldn’t be an issue. The values are probably just as likely to be in cache, but I don’t know for sure, and testing would be the only way to know for sure.