Mail Archives: djgpp/2001/01/18/08:39:05
> Contents:
> - Fastest possible way to draw pixel´s (well, maybe the near pointer hack
> mentioned in DJGPP FAQ is faster :)). Drawing developed as a macro (becourse
> jumping to function and back again takes more time than drawing the damn
> pixel !). Screen coordinates pre-calculated in the global table.
>
> Feedback needed about the following subjects:
> 1) Is it necessary to save ES segment register (the macro currently does not
> do it, but it seems to work fine, no crashes, etc...) ?
> 2) Is the assembly command "les %0,%%edi" faster than the currently used
> "movw %0,%%es;movl %1,%%edi" pair ?
Have you heard about the far ptr hack in djgpp? It even allows loading
the segment outside a tight loop...
(It was designed to work with systems that don't allow segment limits
to be set to 4GB.)
About your questions:
-yes, you should save ES, because someone (memcpy) might use it...
-les: On the P4 it is slower, on other systems it is about the same
-precalculated tables: when you use integer math only, it is faster to
calculate it on the fly, because you can spare a few TLB and cache
entries with it (the overall speed will be faster)
-tables are to be used instead of float math...
- Raw text -