[Algorithms] Shifting or Multiplication....
Brought to you by:
vexxed72
From: Alex M. <Am...@Bw...> - 2000-12-23 20:36:08
|
I was wondering if anyone could clear up something. Algorithmically, = is bitshifting or using multiplication faster?? Now, I know this sounds = like a subjective question, as some will undoubtadly say, it depends on = the compiler and what it translates the code into. Lets take it down to = the ASM level. Shifting, to me, looks like a 1 cycle operation. In this age, if the CPU can handle most MUL's almost as rapidly, is = there a place for bitshifts? If so, then for what kinds of algo = applications? Do we still need them to mask off bits in pixels colors? |