Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 1997 10:38:37 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        ajones@ctron.com (Alexander Seth Jones)
Cc:        hackers@freefall.freebsd.org
Subject:   Re: performance puzzler
Message-ID:  <199701311738.KAA03009@phaeton.artisoft.com>
In-Reply-To: <32F20D0B.6385@ctron.com> from "Alexander Seth Jones" at Jan 31, 97 10:17:31 am

next in thread | previous in thread | raw e-mail | index | archive | help
>   The code consists of protocol messages being encoded into a byte
> stream, and then decoded back into a C++ object.  One of the messages is
> 200 bytes in length, and I successfully decode it, do all error
> checking, etc., in about 0.5 milliseconds.  This is without -O, and with
> -m486 and -ggdb.  The hardware is an Intel 486-66, running
> 2.1.5-RELEASE.
> 
>   The puzzling thing comes when I try to run the test at home on my AMD
> 486-120, running 2.1.0-RELEASE.  It runs the test in 0.6 milliseconds!!

Divide each clock speed by increasing integer values starting with 1
until the result is less than or equal to 33.  This is your max bus
speed possible for the system.  An easy way to do this is magnitude
based arithmatic (yes, I own a slide-rule):

exp(log(120)%log(33)) = 30
exp(log(66)%log(33)) = 33

Your bus on the 120 is 3MHz slower than the bus on the 66.  What you
are doing is not I/O bound, it is CPU bound.

It is a common mistake to believe that a clock multiplied CPU will make
everything faster, and frequently people trade down bus speed to trade
up CPU speed.  In point of fact, access to everything but L1 is done
at bus speed, not CPU speed, and access to non-L1, non-L2 potentially
causes I/O wait states.


These are the results you should expect on I/O bound operations, even
on CPU's from the same chipmask.

There may be AMD-specific instruction speed difference on top of this.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701311738.KAA03009>