lkml.org 
[lkml]   [1998]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.081 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site