The former function is particularly optimized for exactly the use case we're interested in: an all-zero buffer. This reduces the overhead of calling this function some 80% or more. This is particularly for instrumenting code heavy with string processing functions, like grep. An invocation of grep with the pattern '[aeiou]k[aeiou]' has its runtime reduced by ~75% with this patch
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/msan/msan.cpp | ||
---|---|---|
560 | __builtin_clzll can do the trick, however you will need to check little/big endian but I don't know if it will make a difference |
compiler-rt/lib/msan/msan.cpp | ||
---|---|---|
535 | use early exit |
use early exit