diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-11 13:20:54 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-11 13:20:54 +0000 |
commit | 2c72b8859a959629462a58b1385408e25bb89bad (patch) | |
tree | 642898019688864118b59e07c7ba0b0edd7785bd /js/src/tests | |
parent | 006d2ca8275797753c18caffa273ea671ad2527d (diff) | |
download | uxp-2c72b8859a959629462a58b1385408e25bb89bad.tar.gz |
Issue #1738 - Part 1: Improve performance of JSON stringify
- Use some pointer voodoo and instead of stringbuffer append()
- Use a lookup table instead of char comparisons for chr < 256
- Stop using a Hashtable/MovableCellHasher for JSON CycleDetector
Diffstat (limited to 'js/src/tests')
-rw-r--r-- | js/src/tests/ecma_5/JSON/stringify.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/src/tests/ecma_5/JSON/stringify.js b/js/src/tests/ecma_5/JSON/stringify.js index 1a7e9b1500..3b21474206 100644 --- a/js/src/tests/ecma_5/JSON/stringify.js +++ b/js/src/tests/ecma_5/JSON/stringify.js @@ -34,6 +34,9 @@ assertStringify({'mmm\\mmm':"hmm"}, '{"mmm\\\\mmm":"hmm"}'); assertStringify({'mmm\\mmm\\mmm':"hmm"}, '{"mmm\\\\mmm\\\\mmm":"hmm"}'); assertStringify({"mm\u000bmm":"hmm"}, '{"mm\\u000bmm":"hmm"}'); assertStringify({"mm\u0000mm":"hmm"}, '{"mm\\u0000mm":"hmm"}'); +assertStringify({"\u0000\u000b":""}, '{"\\u0000\\u000b":""}'); +assertStringify({"\u000b\ufdfd":"hmm"}, '{"\\u000b\ufdfd":"hmm"}'); +assertStringify({"\u000b\ufdfd":"h\xfc\ufdfdm"}, '{"\\u000b\ufdfd":"h\xfc\ufdfdm"}'); var x = {"free":"variable"}; assertStringify(x, '{"free":"variable"}'); |