-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid repeated branches while iterating StringView
Summary: Original Author: avp@meta.com Original Git: 8fd20f2 Original Reviewed By: neildhar Original Revision: D46117526 `quoteStringForJSON` was operating via indexed access on `StringView`, performing an `isASCII()` check every iteration and leading to slow quoting during `JSON.stringify`. Modify the function to take `UTF16Ref` or `ASCIIRef` directly, so that it knows the type. This increases code size slightly while resulting in significant speedups in `JSON.stringify`. Reviewed By: avp Differential Revision: D53618494 fbshipit-source-id: 48ed47cc0d2deb6f9291c7c944f8addb07fffce0
- Loading branch information
1 parent
a8770ff
commit 6286470
Showing
2 changed files
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters