|
|
Orchid XP v8 wrote:
> OK, cool. So basically there is no way I can tell whether implementing
> an algorithm one way or the other will yield the best speed. Yay, me. :-/
Not only that, but modern processors can get a significant speed boost
based on the order of instructions presented. e.g. if you have 2
instructions, one dependent on the previous, it's entirely possible to
move an instruction between those two to take advantage of the
processor's pipelining. But, then you have to know what instructions
each pipeline can handle, and those 2 instructions cannot share any
resources. e.g. You may have something like:
(my x86 assembler is a bit rough so my syntax may be off.)
mov ecx, 10h
add ecx, ah
mov ebx, [var1]
add ebx, 16
The above could be rearranged to give better performance:
mov ecx, 10h ; p1
mov ebx, [var1] ; p2
add ecx, ah ; p1
add ebx, 16 ; p2
--
~Mike
Post a reply to this message
|
|