[scanner] Micro-optimize string scanning
For small strings there's not much of a difference, but allows faster scanning over long strings. By directly accessing the underlying buffer and by typically only needing 2 branches per non-special character. Change-Id: I9c2c513177d9bf5e3f10c14a07bf6ecc2872b2f0 Reviewed-on: https://chromium-review.googlesource.com/c/1329206 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57402}
Showing
Please
register
or
sign in
to comment