RESOLVED FIXED Bug 202676
[JSC] Add fast path for String#localeCompare
https://bugs.webkit.org/show_bug.cgi?id=202676
Summary [JSC] Add fast path for String#localeCompare
Yusuke Suzuki
Reported 2019-10-07 19:35:11 PDT
...
Attachments
Patch (3.84 KB, patch)
2019-10-29 01:18 PDT, Yusuke Suzuki
no flags
Patch (4.88 KB, patch)
2019-10-29 01:42 PDT, Yusuke Suzuki
no flags
Patch (4.87 KB, patch)
2019-10-29 01:43 PDT, Yusuke Suzuki
no flags
Patch (6.41 KB, patch)
2019-10-29 13:24 PDT, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2019-10-29 01:12:51 PDT
I've tried small improvement and gets significantly better result: if string is all-ascii, use ucol_strcollUTF8.
Yusuke Suzuki
Comment 2 2019-10-29 01:18:33 PDT
Yusuke Suzuki
Comment 3 2019-10-29 01:42:12 PDT
Yusuke Suzuki
Comment 4 2019-10-29 01:43:24 PDT
Yusuke Suzuki
Comment 5 2019-10-29 13:24:03 PDT
Mark Lam
Comment 6 2019-10-29 13:36:21 PDT
Comment on attachment 382215 [details] Patch r=me. Do we already have test cases for 8bit vs 8bit, 16 bit vs 16bit, 8bit vs 16bit, and 16bit vs 8bit localeCompare? If not, can you add this test to make sure there's no bug introduced here? Also an API test to verify that StringView::isAllASCII() is working would also be nice. Thanks.
Yusuke Suzuki
Comment 7 2019-10-29 13:40:13 PDT
(In reply to Mark Lam from comment #6) > Comment on attachment 382215 [details] > Patch > > r=me. Do we already have test cases for 8bit vs 8bit, 16 bit vs 16bit, 8bit > vs 16bit, and 16bit vs 8bit localeCompare? If not, can you add this test to > make sure there's no bug introduced here? Also an API test to verify that > StringView::isAllASCII() is working would also be nice. Thanks. Oops, I forgot uploading the test.
Radar WebKit Bug Importer
Comment 8 2019-10-29 14:14:53 PDT
Yusuke Suzuki
Comment 9 2019-10-29 14:43:38 PDT
Note You need to log in before you can comment on or make changes to this bug.