3 ms·
On earlier-model processors, it could be as bad as 40 cycles. You really didn't want to touch multiplication (or division!) back then. I recall programmers we
by jcl 18y ago
On earlier-model processors, it could be as bad as 40 cycles. You really didn't want to touch multiplication (or division!) back then. I recall programmers went as far as calculating memory offsets for a 320x200 screen as (x + (y << 8) + (y << 6)) instead of (x + y * 320).
http://home.comcast.net/~fbui/intel_i.html#imul http://home.comcast.net/~fbui/intel_i.html#imul