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
$ vagrant ssh
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-36-generic x86_64)
0 packages can be updated.
0 updates are security updates.
Last login: Thu Oct 11 09:02:17 2018 from 10.0.2.2
vagrant@ubuntu-bionic:~$ cd /vagrant
vagrant@ubuntu-bionic:/vagrant$ time ./strstr aa
matches = 3000000
real 0m4.877s
user 0m4.852s
sys 0m0.012s
vagrant@ubuntu-bionic:/vagrant$
Same machine :
$ vagrant init ubuntu/xenial64
$ vagrant up
$ vagrant ssh
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-135-generic x86_64)
0 packages can be updated.
0 updates are security updates.
New release '18.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Thu Oct 11 08:22:26 2018 from 10.0.2.2
vagrant@ubuntu-xenial:~$ cd /vagrant
vagrant@ubuntu-xenial:/vagrant$ time ./strstr aa
matches = 3000000
real 0m0.525s
user 0m0.508s
sys 0m0.000s
vagrant@ubuntu-xenial:/vagrant$
vagrant@ubuntu-xenial:/vagrant$ time ./strstr aa
matches = 3000000
real 0m0.525s
user 0m0.508s
sys 0m0.000s
vagrant@ubuntu-xenial:/vagrant$
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
$ vagrant ssh
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-36-generic x86_64)
* Documentation: https:/ /help.ubuntu. com /landscape. canonical. com /ubuntu. com/advantage
* Management: https:/
* Support: https:/
System information as of Thu Oct 11 09:02:46 UTC 2018
System load: 0.0 Processes: 97
Usage of /: 9.8% of 9.63GB Users logged in: 0
Memory usage: 12% IP address for enp0s3: 10.0.2.15
Swap usage: 0%
* Security certifications for Ubuntu!
We now have FIPS, STIG, CC and a CIS Benchmark.
- http:// bit.ly/ Security_ Certification
* Want to make a highly secure kiosk, smart display or touchscreen?
Here's a step-by-step tutorial for a rainy weekend, or a startup.
- https:/ /bit.ly/ secure- kiosk
Get cloud support with Ubuntu Advantage Cloud Guest: www.ubuntu. com/business/ services/ cloud
http://
0 packages can be updated.
0 updates are security updates.
Last login: Thu Oct 11 09:02:17 2018 from 10.0.2.2 ubuntu- bionic: ~$ cd /vagrant ubuntu- bionic: /vagrant$ time ./strstr aa
vagrant@
vagrant@
matches = 3000000
real 0m4.877s ubuntu- bionic: /vagrant$
user 0m4.852s
sys 0m0.012s
vagrant@
Same machine :
$ vagrant init ubuntu/xenial64
$ vagrant up
$ vagrant ssh
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-135-generic x86_64)
* Documentation: https:/ /help.ubuntu. com /landscape. canonical. com /ubuntu. com/advantage
* Management: https:/
* Support: https:/
Get cloud support with Ubuntu Advantage Cloud Guest: www.ubuntu. com/business/ services/ cloud
http://
0 packages can be updated.
0 updates are security updates.
New release '18.04.1 LTS' available. upgrade' to upgrade to it.
Run 'do-release-
Last login: Thu Oct 11 08:22:26 2018 from 10.0.2.2 ubuntu- xenial: ~$ cd /vagrant ubuntu- xenial: /vagrant$ time ./strstr aa
vagrant@
vagrant@
matches = 3000000
real 0m0.525s ubuntu- xenial: /vagrant$ ubuntu- xenial: /vagrant$ time ./strstr aa
user 0m0.508s
sys 0m0.000s
vagrant@
vagrant@
matches = 3000000
real 0m0.525s ubuntu- xenial: /vagrant$
user 0m0.508s
sys 0m0.000s
vagrant@