• Ilya Tocar's avatar
    runtime: use bytes.IndexByte in findnull · 91102bf7
    Ilya Tocar authored
    bytes.IndexByte is heavily optimized. Use it in findnull.
    This is second attempt, similar to CL97523.
    In this version we never call IndexByte on region of memory,
    that crosses page boundary. A bit slower than CL97523,
    but still fast:
    
    name        old time/op  new time/op  delta
    GoString-6   164ns ± 2%   118ns ± 0%  -28.00%  (p=0.000 n=10+6)
    
    findnull is also used in gostringnocopy,
    which is used in many hot spots in the runtime.
    
    Fixes #23830
    
    Change-Id: Id843dd4f65a34309d92bdd8df229e484d26b0cb2
    Reviewed-on: https://go-review.googlesource.com/98015
    Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    91102bf7
Name
Last commit
Last update
..
errors Loading commit data...
fortran Loading commit data...
gmp Loading commit data...
life Loading commit data...
nocgo Loading commit data...
stdio Loading commit data...
test Loading commit data...
testasan Loading commit data...
testcarchive Loading commit data...
testcshared Loading commit data...
testgodefs Loading commit data...
testplugin Loading commit data...
testsanitizers Loading commit data...
testshared Loading commit data...
testsigfwd Loading commit data...
testso Loading commit data...
testsovar Loading commit data...
testtls Loading commit data...