atom feed30 messages in org.python.python-dev[Python-Dev] String hash function mul...
FromSent OnAttachments
Raymond HettingerApr 13, 2004 8:00 pm 
Jeff EplerApr 13, 2004 9:10 pm 
Bob IppolitoApr 13, 2004 9:26 pm 
Jeff EplerApr 13, 2004 10:04 pm 
Raymond HettingerApr 13, 2004 10:17 pm 
Jeff EplerApr 13, 2004 11:10 pm 
Guido van RossumApr 13, 2004 11:26 pm 
Tim PetersApr 13, 2004 11:56 pm 
Jeff EplerApr 14, 2004 9:08 am 
Raymond HettingerApr 14, 2004 12:06 pm 
Andrew MacIntyreApr 14, 2004 3:23 pm 
Jeff EplerApr 14, 2004 3:35 pm 
Mike PallApr 14, 2004 5:50 pm 
Tim PetersApr 14, 2004 11:14 pm 
Michael HudsonApr 15, 2004 7:05 am 
Mike PallApr 15, 2004 9:36 am 
Guido van RossumApr 15, 2004 10:27 am 
Jeremy HyltonApr 15, 2004 10:38 am 
Guido van RossumApr 15, 2004 10:42 am 
Mike PallApr 15, 2004 11:56 am 
Mike PallApr 15, 2004 11:56 am 
Skip MontanaroApr 15, 2004 11:59 am 
Michael HudsonApr 15, 2004 1:27 pm 
Raymond HettingerApr 15, 2004 2:22 pm 
Thomas HellerApr 15, 2004 2:31 pm 
"Martin v. Löwis"Apr 15, 2004 3:07 pm 
Jeremy HyltonApr 15, 2004 11:26 pm 
Tim PetersApr 16, 2004 12:18 am 
"Martin v. Löwis"Apr 16, 2004 2:00 am 
Andrew MacIntyreApr 16, 2004 9:14 pm 
Subject:[Python-Dev] String hash function multiplier
From:Andrew MacIntyre (andy@bullseye.apana.org.au)
Date:Apr 14, 2004 3:23:23 pm
List:org.python.python-dev

On Wed, 14 Apr 2004, Jeff Epler wrote:

Pentium IV, 2.4GHz: -O2 -mcpu=i386 -DMUL=100003 1.56

{...}

-O2 -mcpu=pentium4 -DMUL=100003 0.63

{...}

With AMD CPUs, the current multiplier beats both the new multipler and the version expressed as shifts and adds/subtracts:

{...}

On an Athlon XP 2600+: -O2 -mcpu=i386 -DMUL=100003 0.95

{...}

-O2 -mcpu=athlon-xp -DMUL=100003 0.43 *

{...}

Long-at-a-time hash, Duron, 1GHz: -O2 -march=athlon-tbird -DMUL=100003 0.35

Ummm... are you showing what you think you're showing here? As I recall, i386 gcc uses -mcpu and -march differently to most other architectures: - -mcpu just sets scheduling parameters, but not instruction set; - -march sets the instruction set.

So most of the timings you show are for the i386 instruction set, but with different scheduling. The exception is the long-at-a-time hash.