Show newer

@p By "old" I was thinking around turn of the century.
I don't know how to properly benchmark such tiny tasks either. I think you just have to run each one like billion times and see the difference.

@p Hmmm, thinking about it more, I think a lookup table might be the fastest, because the whole table could fit into L1 cache.
Manual addition would probably be best on some older CPU.
Switch case is pretty fast, but could get slow with a poor branch prediction.
Loop has too many jumps and is variable.

@p Whatever accesses memory the least so 1 probably

Peak Oil (until we find another deposit)

Peak Uranium (until we find another deposit, or rework the non-proliferation framework)

Peak Hydrogen (in a universe where hydrogen is the majority of all matter)

Show older
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.