aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorKarl Seguin <karlseguin@users.noreply.github.com>2023-10-09 21:50:16 +0800
committerGitHub <noreply@github.com>2023-10-09 16:50:16 +0300
commit75b48ef503204d3ba005647ecce8fda4657a8588 (patch)
treee84b4d576938585c06f94b498785e6539bd60938 /src/codegen
parent57874ce619c098a4affd6804a71e0604ff3874c8 (diff)
downloadzig-75b48ef503204d3ba005647ecce8fda4657a8588.tar.gz
zig-75b48ef503204d3ba005647ecce8fda4657a8588.zip
std.mem: use indexOfScalarPos when indexOf is called where needle.len == 1
When `std.mem.indexOf` is called with a single-item needle, use `indexOfScalarPos` which is significantly faster than the more general `indexOfPosLinear`. This can be done without introducing overhead to normal cases (where `needle.len > 1`).
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions