about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-04 05:38:18 +0000
committerbors <bors@rust-lang.org>2018-05-04 05:38:18 +0000
commite78c51adc2a51fbec1d254d2ba8d8718688c7429 (patch)
tree9a564a890765082384bf4332fd9c12f8a45bf7e1 /src/rustllvm/RustWrapper.cpp
parent841e0ccb4cabaaf20041e3ba5c3e927cb95d86ce (diff)
parent1cefb5ce310fe7f799d0926d2644a25a567d2ddb (diff)
downloadrust-e78c51adc2a51fbec1d254d2ba8d8718688c7429.tar.gz
rust-e78c51adc2a51fbec1d254d2ba8d8718688c7429.zip
Auto merge of #50398 - llogiq:memchr-nano-opt, r=nagisa
nano-optimization for memchr::repeat_byte

This replaces the multiple shifts & bitwise or with a single multiplication

In my benchmarks this performs equally well or better, especially on 64bit systems (it shaves a stable nanosecond on my skylake). This may go against conventional wisdom, but the shifts and bitwise ors cannot be pipelined because of hard data dependencies.

While it may or may not be worthwile from an optimization standpoint, it also reduces code size, so there's basically no downside.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions