Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 1997 10:17:31 -0500
From:      Alexander Seth Jones <ajones@ctron.com>
To:        hackers@freefall.freebsd.org
Subject:   performance puzzler
Message-ID:  <32F20D0B.6385@ctron.com>

next in thread | raw e-mail | index | archive | help
I've just run into a puzzling situation:

  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!!

  I decided to do some investigation.  I ran the lmbenchmark memory read
and write tests on both machines, and the 120 beat the 66 convincingly
on every test.  I then ran a simple test that incremented an integer 100
million times.  It took the 120 between 17 and 18 seconds, and the 66
between 26 and 27 seconds, which is close to the 120/66 ratio I would
expect.

  Why, then, does the 120 run my code slower than the 66?  I've double
checked and re-double checked the test, had other people look at it, and
it is a valid test.  Is there an instruction that I'm using a lot that
Intel can do that much faster than AMD?

  Help...

-- 
Alex Jones              |  ajones@ctron.com
Cabletron Systems, Inc.
Durham, NH USA 03824



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