MAKE.PENTIUM.FAST (was Re: Bogomips)

ganesh@cse.iitb.ernet.in
Sun, 17 Aug 1997 03:30:20 +0530 (IST)


Bogomips are calculated by timing an empty loop. Because of some
branch prediction weirdness the Pentium performs rather poorly while
executing an empty loop, incurring a pipeline flush at every jump.
The following patch (2.0.30) boosts my P100 from a lowly 39.94 to 99.74
Of course it's purely cosmetic - don't expect your pentium to run thrice
as fast :)

-- ganesh
_____________________________________________________________________________
> So, what you're saying is, the world *does* make sense to you?
> Could you please explain it, then?
People are foolish and selfish and the universe doesn't care.
Also, fermions interact by means of exchange of virtual bosons.
_____________________________________________________________________________

--- linux/include/asm-i386/delay.h.org Sun Aug 17 03:23:07 1997
+++ linux/include/asm-i386/delay.h Tue Jul 29 18:29:24 1997
@@ -14,7 +14,7 @@
extern __inline__ void __delay(int loops)
{
__asm__ __volatile__(
- ".align 2,0x90\n1:\tdecl %0\n\tjns 1b"
+ ".align 2,0x90\n1:\tdecl %0\n\tnop\n\tjns 1b"
:/* no outputs */
:"a" (loops)
:"ax");