Overview
| Artifact ID: | 259b0e490787b99bc42d991fbd68fcc643ed21a0 |
|---|---|
| Ticket: | 951168ffffffffffffffffffffffffffffffffff
strcmp in CompareStringKeys |
| User & Date: | nobody on 2004-05-27 19:43:55 |
Changes
- icomment:
Logged In: NO Well. I run the test on a dual Pentium-III (800Mhz) machine. RedHat linux 7.1. glibc 2.2.5 and both 2.95.3 and 3.4.0 gcc. I noticed that gcc 2.95.3 produces similar results, instead with 3.4.0 strcmp runs faster (probably inlines optimized assembly code). If you want I can try to do a complete comparition on other machine/compilers. Giambattista Here the results (I removed __NO_STRING_INLINES from the code): lele@sughero[61]=> /geek-gadgets/i686-glibc22-linux/gcc- 3.4.0/bin/gcc -O3 -march=i686 strcmpr.c lele@sughero[62]=> a.out strcmp time = 0 own time = 200000 lele@sughero[63]=> /geek-gadgets/i686-glibc22-linux/gcc- 3.4.0/bin/gcc -O2 -march=i686 strcmpr.c lele@sughero[64]=> a.out strcmp time = 10000 own time = 180000 lele@sughero[65]=> /geek-gadgets/i686-glibc22-linux/gcc- 3.4.0/bin/gcc -O1 -march=i686 strcmpr.c lele@sughero[66]=> a.out strcmp time = 0 own time = 300000 lele@sughero[67]=> /geek-gadgets/i686-glibc22-linux/gcc- 3.4.0/bin/gcc -march=i686 strcmpr.c lele@sughero[68]=> a.out strcmp time = 230000 own time = 470000 lele@sughero[69]=> /geek-gadgets/i686-glibc22-linux/gcc- 2.95.3/bin/gcc -march=i686 -O3 strcmpr.c lele@sughero[70]=> a.out strcmp time = 220000 own time = 200000 lele@sughero[71]=> /geek-gadgets/i686-glibc22-linux/gcc- 2.95.3/bin/gcc -march=i686 -O2 strcmpr.c lele@sughero[72]=> a.out strcmp time = 220000 own time = 210000 lele@sughero[73]=> /geek-gadgets/i686-glibc22-linux/gcc- 2.95.3/bin/gcc -march=i686 -O1 strcmpr.c lele@sughero[74]=> a.out strcmp time = 230000 own time = 210000 lele@sughero[75]=> /geek-gadgets/i686-glibc22-linux/gcc- 2.95.3/bin/gcc -march=i686 strcmpr.c lele@sughero[76]=> a.out strcmp time = 230000 own time = 490000
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"