https://codereview.chromium.org/1324803003/diff/1/src/string-search.h
File src/string-search.h (right):
https://codereview.chromium.org/1324803003/diff/1/src/string-search.h#newcode214
src/string-search.h:214: Max(static_cast<uint8_t>(pattern_first_char &
0xFF),
On 2015/09/05 10:26:58, Jakob wrote:
Why this change? "... & 0xFF" gives the low byte regardless of
endian-ness, and
always searching for the low byte should be fine.
A lot faster since the low byte can be 0 and faster to search highest
value byte
old new
single character single character
Κ found at 922 Κ found at 922
616 577
㎡ found at 13217 ㎡ found at 13217
4931 4707
က found at 4096 က found at 4096
9836 1634
found at 65280 found at 65280
36149 26415
ᆬ found at 65445 ᆬ found at 65445
36666 31258
found at 8197 found at 8197
11757 3099
倂 found at 20482 倂 found at 20482
17193 8780
linear search linear search
ΚΛ found at 922 ΚΛ found at 922
504 565
㎡㎢ found at 13217 ㎡㎢ found at 13217
5119 5014
ᆬᆭ found at 65445 ᆬᆭ found at 65445
35496 32745
linear + bmh search linear + bmh search
ΚΛΜΝΞΟΠΡ found at 922 ΚΛΜΝΞΟΠΡ found at 922
522 533
ᆬᆭᄃᄄᄅᆰᆱᆲ found at 65445 ᆬᆭᄃᄄᄅᆰᆱᆲ found at 65445
35283 30513
https://codereview.chromium.org/1324803003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.