-
Camillo Bruni authored
memchr is used in the default case but for two-byte strings that contain mostly ascii sequences every other byte is 0. This CL special-cases the 0 byte search in a two-byte string to simply peform a simple for loop which is rouhly 10x faster than the repeated memchr approach. Bug: v8:10737 Change-Id: Icde6b858b6679da69448295616734c46aa95e439 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2364507Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#69721}
0fed3c75