You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid repeated branches while iterating StringView
Summary:
Original Author: [email protected]
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
0 commit comments