Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sun, 18 Sep 2016 20:54:22 +0200
From: Georg Sauthoff <mail@...rg.so>
To: musl@...ts.openwall.com
Subject: memchr() performance

(please CC me as I am not subscribed to this ML)

Hello,

fyi, I've done some benchmarking of different memchr() and std::find()
versions.

I also included the memchr() version from musl.

In general, musl's memchr() implementation doesn't perform better than a
simple unrolled loop (as used in libstdc++ std::find()) - and that is
consistent over different CPU generations and architectures.

On recent Intel CPUs it is even slower than a naive implementation:

https://gms.tf/stdfind-and-memchr-optimizations.html#measurements
https://gms.tf/sparc-and-ppc-find-benchmark-results.html

Of course, on x86, other implementations that use SIMD instructions
perform even better.

Best regards
Georg

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.