hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0
avp
tagged this
07 Aug 18:23
Summary: `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: neildhar Differential Revision: D46117526 fbshipit-source-id: e6b849fc8b4e2e748e05d277e36462b8d97ae095