Mail Archives: djgpp/1996/10/24/08:05:00
Emil0 AT aol DOT com wrote:
>Using near pointers in no quicker because you still have to
>load the %edi register with your pointer and then no doubt add some stuff to
>this to access the right pixel. With my method you load %es or whatever and
>then load stuff into %edi to point to the right pixel - so it is not slower
>(apart from perhaps another register to save on the stack, although a push
>and a pop will hardly slow a program down even if done hundreds of times a
>second).
Not just pushing, loading a segment register is also slow. On a 486
loading a general register usually takes 1 clock, but loading a
segment register takes at least 9 clocks, mostly due to the additional
memory accesses for loading the segment shadow registers.
Then you have all the segment prefixes, which I've heard might slow
down a PPro (though I'm not quite sure about that, maybe that was only
the operand size prefix, not all prefixes). "stosl" is supposed to be
slower than movs on Pentium+, I think.
- Raw text -