*Exactly* what is wrong in testing the good old way, by checksuming a
large datablock and measure the time it takes?! Answer: ** NOTHING **
If one algorithm is 10x slower in that test there is no *REASON* to test
it further, just scrap the slower one or rewrite it from scratch.
> As I stated in the beginning of the conversation, that is now getting way
> too tired, test whatever you want with the cycle-counter and the interrupts
> OFF so you test only that code. Then repeat your last statement.
Why? There is no reason at *ALL* to do that.
Anyway, have you followed the comp.arch/comp.lang.c thread about this?
(TCP/IP checksum)
Excerpts from a port by Terje Mathiesen (Terje.Mathisen@hda.hydro.com, in
the article with message id: <32826E09.BF2@hda.hydro.com> posted 8 Nov):
: The algorithm they use is nearly identical to the one I worked out a
: few years ago, and which has obviously been used several times before,
: on many different platforms.
:
: The Linux asm version is nearly optimal, wasting one pipeline slot
: every three instructions, so it can still be speeded up by another 33%.
:
: My only claim to fame here is that I got the idea independently, and
: managed to schedule everything optimally so that I have no wasted
: pipeline slots anywhere on a Pentium.
-- Torbjörn Lindgren Funcom Oslo AS, Langkaia 1, N-0150 Oslo, Norway E-mail: tl@funcom.com If Santa ever DID deliver presents on Christmas Eve, he's dead now.