Commit Graph
2305 Commits
Author SHA1 Message Date
Nigel Tao 07d99dc2e1 Update some RFC links 2020-03-12 16:58:38 +11:00
Nigel Tao 3690e83d86 Rename example/jsonptr's -compact flag 2020-03-12 16:52:26 +11:00
Nigel Tao a3827275c0 Add std/json quirks 2020-03-12 16:47:26 +11:00
Nigel Tao d6fdfb133f Add example/jsonptr -strict-json-pointer-syntax 2020-03-12 11:32:28 +11:00
Nigel Tao c3ca77a539 Add WUFFS_BASE__TOKEN__VBD__NUMBER__FORMAT_ETC 2020-03-11 12:06:50 +11:00
Nigel Tao 499ca132f6 Add wuffs_base__parse_number_f64 2020-03-11 11:41:32 +11:00
Nigel Tao 52c4d6ae4b Add example/jsonptr -max-output-depth flag 2020-03-08 21:12:38 +11:00
Nigel Tao fdac24a425 Rename FOO_BUFFER_SIZE to FOO_BUFFER_ARRAY_SIZE 2020-03-06 21:53:08 +11:00
Nigel Tao 01abc84784 Let example/jsonptr take a filename arg 2020-03-06 21:42:33 +11:00
Nigel Tao a5184edd6a Fix std/json's checking of number length too long
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21051
2020-03-06 21:05:44 +11:00
Nigel Tao 6e7d1410ee Redo how example/jsonptr's -indent=N -tabs works 2020-03-06 09:21:35 +11:00
Nigel Tao c30716208c Remove accidental "#include <stdio.h>" 2020-03-06 09:19:49 +11:00
Nigel Tao fe0cbbd6e9 Have example/jsonptr self-impose a sandbox 2020-03-06 09:07:59 +11:00
Nigel Tao e65c861207 Extend std/deflate ringbuffer to simplify copies
name                                             old speed     new speed     delta

wuffs_deflate_decode_1k_full_init/clang5         155MB/s ± 1%  154MB/s ± 0%   -0.98%  (p=0.000 n=10+9)
wuffs_deflate_decode_1k_part_init/clang5         190MB/s ± 0%  193MB/s ± 1%   +1.49%  (p=0.000 n=10+9)
wuffs_deflate_decode_10k_full_init/clang5        240MB/s ± 0%  249MB/s ± 0%   +3.68%  (p=0.000 n=9+10)
wuffs_deflate_decode_10k_part_init/clang5        247MB/s ± 0%  257MB/s ± 1%   +4.03%  (p=0.000 n=10+10)
wuffs_deflate_decode_100k_just_one_read/clang5   292MB/s ± 1%  291MB/s ± 0%   -0.34%  (p=0.043 n=10+9)
wuffs_deflate_decode_100k_many_big_reads/clang5  246MB/s ± 0%  250MB/s ± 0%   +1.77%  (p=0.000 n=9+10)

wuffs_deflate_decode_1k_full_init/gcc9           166MB/s ± 1%  165MB/s ± 1%   -0.48%  (p=0.009 n=10+10)
wuffs_deflate_decode_1k_part_init/gcc9           208MB/s ± 1%  212MB/s ± 0%   +1.85%  (p=0.000 n=10+9)
wuffs_deflate_decode_10k_full_init/gcc9          248MB/s ± 1%  281MB/s ± 0%  +13.05%  (p=0.000 n=9+10)
wuffs_deflate_decode_10k_part_init/gcc9          256MB/s ± 0%  290MB/s ± 0%  +13.34%  (p=0.000 n=10+10)
wuffs_deflate_decode_100k_just_one_read/gcc9     336MB/s ± 0%  333MB/s ± 0%   -0.93%  (p=0.000 n=9+8)
wuffs_deflate_decode_100k_many_big_reads/gcc9    262MB/s ± 0%  280MB/s ± 1%   +6.99%  (p=0.000 n=9+10)
2020-03-05 12:35:03 +11:00
Nigel Tao 771d4f9d98 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)
2020-03-05 11:17:57 +11:00
Nigel Tao 07110398f1 Optimize std/json string decoding
name                                    old speed     new speed      delta

wuffs_json_decode_1k/clang5             729MB/s ± 1%  1130MB/s ± 0%  +54.99%  (p=0.000 n=10+10)
wuffs_json_decode_21k_formatted/clang5  541MB/s ± 1%   576MB/s ± 1%   +6.44%  (p=0.000 n=10+10)
wuffs_json_decode_26k_compact/clang5    603MB/s ± 0%   873MB/s ± 1%  +44.72%  (p=0.000 n=9+10)
wuffs_json_decode_217k_stringy/clang5   607MB/s ± 0%   727MB/s ± 0%  +19.78%  (p=0.000 n=10+10)

wuffs_json_decode_1k/gcc9               871MB/s ± 0%  1104MB/s ± 1%  +26.74%  (p=0.000 n=10+10)
wuffs_json_decode_21k_formatted/gcc9    641MB/s ± 1%   628MB/s ± 0%   -2.03%  (p=0.000 n=10+10)
wuffs_json_decode_26k_compact/gcc9      746MB/s ± 1%   892MB/s ± 0%  +19.54%  (p=0.000 n=10+10)
wuffs_json_decode_217k_stringy/gcc9     736MB/s ± 1%   724MB/s ± 1%   -1.68%  (p=0.000 n=9+10)
2020-03-05 11:00:56 +11:00
Nigel Tao b5662b2906 Fix test_strconv_utf_8_next array size 2020-03-05 10:22:34 +11:00
Nigel Tao 2178dcd4da Fix wuffs_base__utf_8__encode conversion warning 2020-03-04 22:34:11 +11:00
Nigel Tao 267a07d3cb Add an example/zcat -fail-if-unsandboxed flag 2020-03-04 22:30:03 +11:00
Nigel Tao 757a4bd68c Add more test_strconv_parse_number_u64 test cases 2020-03-04 22:18:56 +11:00
Nigel Tao 0cd2f986bf Have jsonptr implement JSON Pointer queries 2020-03-04 21:39:36 +11:00
Nigel Tao b9ad34fad3 Add wuffs_base__utf_8__encode 2020-03-03 12:44:01 +11:00
Nigel Tao 6892095998 Have C programs handle flags consistently 2020-03-03 11:25:18 +11:00
Nigel Tao f928944d64 Add test/data/rfc-6901-json-pointer.json 2020-03-02 14:46:38 +11:00
Nigel Tao 43f0a87a6d Test std/json emit pending strings on bad UTF-8 2020-03-02 13:59:46 +11:00
Nigel Tao 19967648ef Add std/json while.string_loop_outer loop name 2020-03-01 22:39:02 +11:00
Nigel Tao 02b2ecd29e Add std/json while.string_loop_inner loop name 2020-03-01 22:37:50 +11:00
Nigel Tao 4ee19eb807 Have std/json emit pending strings on bad UTF-8
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20973
2020-03-01 22:24:19 +11:00
Nigel Tao 107f0ef2e5 Add jsonptr --compact, --indent and --tabs flags 2020-03-01 21:39:28 +11:00
Nigel Tao b10460f643 Add a fuzz/c --color flag 2020-03-01 14:09:40 +11:00
Nigel Tao 3ab7640bab Add a fuzz_simple implementation to json_fuzzer 2020-03-01 13:49:50 +11:00
Nigel Tao 260995cb05 Have fuzz/c programs define WUFFS_CONFIG__MODULES
Before:
$ time ./build-fuzz.sh fuzz/c/std/json_fuzzer.c
real	0m0.822s
user	0m0.792s
sys	0m0.031s

After:
$ time ./build-fuzz.sh fuzz/c/std/json_fuzzer.c
real	0m0.294s
user	0m0.271s
sys	0m0.024s
2020-03-01 13:11:36 +11:00
Nigel Tao 16867779be Tighten cgen's funk.jumpTarget return type 2020-03-01 12:01:59 +11:00
Nigel Tao 21682f403f Add fuzz/c/std/json_fuzzer.c 2020-03-01 12:01:42 +11:00
Nigel Tao 6b29f32564 Add script/print-json-token-debug-format.c -a flag 2020-02-29 17:05:24 +11:00
Nigel Tao 85fba7f82b Tweak wuffs_base__token bitmask assignments again 2020-02-29 16:28:06 +11:00
Nigel Tao 67f00c15db Add script/print-json-token-debug-format.c -h flag 2020-02-29 16:13:11 +11:00
Nigel Tao 57b1dd69b3 Raise bench_wuffs_json_decode_217k_stringy iters 2020-02-29 10:48:09 +11:00
Nigel Tao d1c928a1ed Have tokens include explicit link bits 2020-02-29 10:46:44 +11:00
Nigel Tao cb37a56997 Have example/jsonptr consider string conversion 2020-02-28 09:56:24 +11:00
Nigel Tao 2cf76db02c Redo example/jsonptr's main loop 2020-02-27 22:42:01 +11:00
Nigel Tao 3b48698db3 Refactor example/jsonptr's handle_string 2020-02-27 15:05:59 +11:00
Nigel Tao 809220e6cc Add wuffs_base__utf_8__next 2020-02-27 14:41:45 +11:00
Nigel Tao 1ad5cfac4d Make wuffs_base__{load,store}_uNNxe public 2020-02-27 10:58:14 +11:00
Nigel Tao 8cd45054fa Fix U+D800 typo in std/json test 2020-02-27 10:28:20 +11:00
Nigel Tao 2fa96fc469 Fix doc/note/auto-formatting.md typo 2020-02-26 22:47:55 +11:00
Nigel Tao 193527bd2d Add script/print-json-token-debug-format.c 2020-02-26 22:47:31 +11:00
Nigel Tao 550ef90114 Have std/json reject invalid UTF-8 2020-02-26 16:26:16 +11:00
Nigel Tao 2e62fa369a Fix wuffs_base__parse_number_i64 warning 2020-02-26 14:37:33 +11:00
Nigel Tao 3b17d5b28a Have std/json reject some invalid UTF-8 2020-02-26 14:36:23 +11:00