[Bug string/23709] glibc 2.27 lacks sse2 optimized strstr()
paul.borile at gmail dot com
sourceware-bugzilla@sourceware.org
Thu Oct 11 09:54:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23709
--- Comment #12 from paul.borile at gmail dot com ---
I made a test compiling for amd64 the attached program and running it on
different platforms. The test run in 0.5 seconds on a sse2 optimized strstr()
while 8 times slower on a non sse2 optimized strstr(). Example of a fast run :
$ docker run -i ubuntu:16.04 /bin/bash -c "cat > strstr ; chmod +x strstr ;
time ./strstr aa" < ./strstr
Unable to find image 'ubuntu:16.04' locally
16.04: Pulling from library/ubuntu
3b37166ec614: Pull complete
504facff238f: Pull complete
ebbcacd28e10: Pull complete
c7fb3351ecad: Pull complete
2e3debadcbf7: Pull complete
Digest: sha256:45ddfa61744947b0b8f7f20b8de70cbcdd441a6a0532f791fd4c09f5e491a8eb
Status: Downloaded newer image for ubuntu:16.04
real 0m0.475s
user 0m0.474s
sys 0m0.000s
matches = 3000000
Example of a slow run :
docker run -i ubuntu:18.04 /bin/bash -c "cat > strstr ; chmod +x strstr ; time
./strstr aa" < ./strstr
Unable to find image 'ubuntu:18.04' locally
18.04: Pulling from library/ubuntu
Digest: sha256:de774a3145f7ca4f0bd144c7d4ffb2931e06634f11529653b23eba85aef8e378
Status: Downloaded newer image for ubuntu:18.04
matches = 3000000
real 0m4.796s
user 0m4.794s
sys 0m0.000s
debian buster is showing the same problem :
docker run -i debian:buster /bin/bash -c "cat > strstr ; chmod +x strstr ; time
./strstr aa" < ./strstr
Unable to find image 'debian:buster' locally
buster: Pulling from library/debian
1064a561889d: Pull complete
Digest: sha256:b17f0ca6c2c0c5ad88b3a292e50ad657c87fc165ef1bde4dba57d9616651a9b9
Status: Downloaded newer image for debian:buster
matches = 3000000
real 0m4.871s
user 0m4.871s
sys 0m0.000s
So it is not an ubuntu 18 only problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list