| Summary: | [JSC] Speed up URL encode/decode by using bitmaps instead of strchr(). | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||||
| Component: | JavaScriptCore | Assignee: | Andreas Kling <kling> | ||||||
| Status: | REOPENED --- | ||||||||
| Severity: | Normal | CC: | benjamin, commit-queue, darin, ggaren, kling | ||||||
| Priority: | P2 | Keywords: | Performance | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | 145206 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Andreas Kling
2015-05-17 23:34:05 PDT
Created attachment 253304 [details]
Patch
Attachment 253304 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:139: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
ERROR: Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:709: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 2 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 253305 [details]
Patch
Attachment 253305 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:139: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
ERROR: Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:709: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 2 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 253305 [details] Patch Clearing flags on attachment: 253305 Committed r184501: <http://trac.webkit.org/changeset/184501> All reviewed patches have been landed. Closing bug. Comment on attachment 253305 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253305&action=review > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:75 > + if (c && doNotEscape.get(static_cast<LChar>(c))) No need for the "c &&" part any more. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:139 > + if (charLen && (u == 0 || u >= 128 || !doNotUnescape.get(static_cast<LChar>(u)))) { No need for the "u == 0 ||" part any more. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:690 > + if (u && doNotEscape.get(static_cast<LChar>(u))) No need for the "u &&" part any more. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:709 > + } else if (u != 0 && doNotEscape.get(static_cast<LChar>(u))) No need for the "u != 0 &&" part any more. Committed r184613: <http://trac.webkit.org/changeset/184613> Re-opened since this is blocked by bug 145206 Oops. I guess I was wrong about not needing the null checks. Are nulls somehow not supported or something? |