The bug has been opened on glibc and being (or already) fixed :
https://sourceware.org/bugzilla/show_bug.cgi?id=23709
Thanks
-Paul
** Bug watch added: Sourceware.org Bugzilla #23709
https://sourceware.org/bugzilla/show_bug.cgi?id=23709
--
You received this bug notification because you are
$ file strstr
strstr: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0,
BuildID[sha1]=f09b9ae65046d6650a9b7007a9aa5d6d472a2d06, not stripped
--
You received this bug notification because you are a member of
I'm running on amd64, i7 cpu :
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Model name: Intel(R)
Public bug reported:
strstr() from glibc is up to 8 times slower than it was on ubuntu16.
Looks like the sse2 optimized code is not used. To reproduce compile
attached file (strstr.c) :
$ gcc -o strstr strstr.c
and then run on the 2 platforms :
$ vagrant init ubuntu/bionic64
$ vagrant up
$
** Description changed:
Looks like code using strstr() and libc-2.27 is running 4 times slower
than was with libc-2.23. Having a look at profiled code executed in
various moments show different versions of strstr :
- libc-2.27.so: strstr.c, str-two-way.h - this is current version
$ lscpu
Architecture:x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s):1
Vendor ID: GenuineIntel
CPU family:
Running /lib/x86_64-linux-gnu/libc.so.6 on my machine gives :
GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY
Public bug reported:
Looks like code using strstr() and libc-2.27 is running 4 times slower
than was with libc-2.23. Having a look at profiled code executed in
various moments show different versions of strstr :
- libc-2.27.so: strstr.c, str-two-way.h - this is current version ubuntu
18.04.1