[scanner] Separate ascii-in-utf8 length computation from decoding the chars
This way we walk the input string twice, but we reduce the number of branches per ascii char in the long-ascii-sequence case from 2 per char to ~ 1 + 2 / sizeof(intptr). Let's land and see what the bots say. Change-Id: I574971c7df896237f3382be634a9bedc920fc827 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649356Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#62046}
Showing
Please
register
or
sign in
to comment