Binary Shifting

BlitzPlus Forums/BlitzPlus Programming/Binary Shifting

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

anyone know a quick way to multiply by 800

x = x * 800

Seriously, that's very fast. The bit shifting trick is a holdover from ancient times. Ordinary multiplication is plenty fast on modern CPU's.

There is still some benefit from avoiding division, however. Whether that benefit is big enough to worry about is another question.