Lower json.DECODER_NUMBER_LENGTH_MAX_INCL to 99

Commit b9f69264a0 "Raise
json.DECODER_NUMBER_LENGTH_MAX_INCL to 2047" might have regressed the
std/json benchmarks.
This commit is contained in:
Nigel Tao committed 2020-07-07 23:29:30 +10:00
1 parent 12a8c7598b
commit 84bb3afd87
4 files changed
+84 -87

No files matched your search

+3 -3
View File
@@ -41,8 +41,8 @@ pub const DECODER_DST_TOKEN_BUFFER_LENGTH_MIN_INCL : base.u64 = 1
// maximum possible src.meta.ri and src.meta.wi values). It is a property of
// the backing array's length, not the length of the JSON-formatted input per
// se. It is perfectly valid to decode "[1,2]" (of length 5) as JSON, as long
// as that content is placed in an io_buffer whose data.len is at least 2048.
pub const DECODER_SRC_IO_BUFFER_LENGTH_MIN_INCL : base.u64 = 2048
// as that content is placed in an io_buffer whose data.len is at least 100.
pub const DECODER_SRC_IO_BUFFER_LENGTH_MIN_INCL : base.u64 = 100
// DECODER_NUMBER_LENGTH_MAX_INCL is the longest supported byte length for a
// JSON number. Unlike JSON strings, this package's tokenizer never splits a
@@ -52,7 +52,7 @@ pub const DECODER_SRC_IO_BUFFER_LENGTH_MIN_INCL : base.u64 = 2048
//
// The JSON spec itself does not define a limit, but allows implementations to
// set their own limits.
pri const DECODER_NUMBER_LENGTH_MAX_INCL : base.u64 = 2047
pri const DECODER_NUMBER_LENGTH_MAX_INCL : base.u64 = 99
// --------