Add std/json lut_decimal_digits

name                                    old speed      new speed      delta

wuffs_json_decode_1k/clang5             1.13GB/s ± 0%  1.12GB/s ± 1%  -1.01%  (p=0.002 n=10+10)
wuffs_json_decode_21k_formatted/clang5   576MB/s ± 1%   595MB/s ± 1%  +3.29%  (p=0.000 n=10+10)
wuffs_json_decode_26k_compact/clang5     873MB/s ± 1%   907MB/s ± 1%  +3.81%  (p=0.000 n=10+10)
wuffs_json_decode_217k_stringy/clang5    727MB/s ± 0%   750MB/s ± 0%  +3.14%  (p=0.000 n=10+8)

wuffs_json_decode_1k/gcc9               1.10GB/s ± 1%  1.11GB/s ± 1%  +0.43%  (p=0.035 n=10+10)
wuffs_json_decode_21k_formatted/gcc9     628MB/s ± 0%   618MB/s ± 1%  -1.59%  (p=0.000 n=10+10)
wuffs_json_decode_26k_compact/gcc9       892MB/s ± 0%   888MB/s ± 1%  -0.43%  (p=0.023 n=10+10)
wuffs_json_decode_217k_stringy/gcc9      724MB/s ± 1%   733MB/s ± 1%  +1.28%  (p=0.000 n=10+10)
This commit is contained in:
Nigel Tao committed 2020-03-05 11:17:57 +11:00
1 parent 07110398f1
commit 771d4f9d98
3 files changed
+65 -2

No files matched your search

+1 -1
View File
@@ -974,7 +974,7 @@ pri func decoder.decode_digits!(src: base.io_reader, n: base.u32[..= 0xFF]) base
break
}
c = args.src.peek_u8()
if (c < 0x30) or (0x39 < c) {
if 0x00 == lut_decimal_digits[c] {
break
}
// Cap the maximum supported number length at an arbitrary value, 99.