Re: Pentiums and EU
- Posted by Robert Craig <rds at EMAIL.MSN.COM> Sep 23, 1998
- 387 views
Hawke writes: > Rob, does ex.exe take advantage of extra features > found in 486/586 processors that aren't found > in 386's? Yes. When I compile it with WATCOM C, I choose C compiler options that produce the fastest possible code for a Pentium, but do not use any instructions that don't exist on a 386/486. For example, a Pentium has two instruction pipelines, so it can potentially execute 2 machine instructions at the same time in parallel (superscalar) provided there are no dependencies between the instructions, such as one instruction needs the result of the previous instruction. There's an option to reorder machine instructions to make this more likely. That option will speed up the code on a Pentium, but won't hurt performance on a 386 or 486. For the older processors the order doesn't matter (usually). As an other example, on a Pentium, 8-byte floating-point numbers load faster to/from memory if they are aligned on an 8-byte boundary in memory. For a 386/486 it doesn't matter, 4-byte alignment is enough. So Euphoria aligns f.p. numbers on 8-byte boundaries. In general, most Pentium-specific optimizations are unlikely to hurt performance on the older processors. It's not worth it to have separate versions optimized specifically for a 386 or a 486. You might only gain 1% at best. Regards, Rob Craig Rapid Deployment Software http://members.aol.com/FilesEu/