Messages in this thread | | | Date | Wed, 18 Mar 1998 09:21:38 +0100 | From | Kurt Garloff <> | Subject | Re: BogoMIPS revisitied...MMX |
| |
On Tue, Mar 17, 1998 at 04:39:22PM -0800, Perry Harrington wrote:
> I know that the bogomips loop is a >small< and tight loop of 3 or > 4 instructions. Why is it that my P100 spits out something like > 39.19 BogoMIPS and my P233MMX spits out 466.15 bogomips? I know > that the Pentium had some issue with this, being that a standard > 486 executed *that* particular loop faster.
1: decl %loops jns 1b
In C: while (loops-- >= 0);
loops is something like -4(%esp)
> So, why such the HUGE difference?
It depends on the optimizations your processor is able to do. Branch prediction and good parallelization of the pipelines do help this code a lot.
Some results: Pentium: 2.5 cycles/loop 6x86 : 1 K6 : 0.5 P5 MMX : 0.5
On some machines it also depends on the alignment of the label 1: (and maybe on the one of loops), that's why this code is no logner inlined in recent kernels.
-- Kurt Garloff, Dortmund <K.Garloff@ping.de> PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |