Nigel Tao
ba3818cb6b
Add more parse_number_f64 test cases
2020-09-28 12:51:45 +10:00
Nigel Tao
4f1d24c070
Add names to "typedef struct { ... } foo" types
2020-09-23 22:02:53 +10:00
Nigel Tao
afe7f27ab7
Trim Eisel-Lemire powers-of-10 tables
...
This tracks the upstream github.com/lemire/fast_double_parser
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:
$ g++ -O3 script/process-json-numbers.c
$ time ./a.out -parse-number-f64 < citylots.json
Before/After:
real 0m1.035s
real 0m1.003s
Binary size, before:
29544 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
29648 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
31192 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
31160 gen/lib/c/gcc-static/wuffs-base-floatconv.o
After:
27160 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
27264 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
28760 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
28760 gen/lib/c/gcc-static/wuffs-base-floatconv.o
2020-09-23 16:18:27 +10:00
Nigel Tao
b6d855210c
Use a formula to calculate Eisel-Lemire power-of-2
...
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:
$ g++ -O3 script/process-json-numbers.c
$ time ./a.out -parse-number-f64 < citylots.json
Before/After:
real 0m0.992s
real 0m1.035s
2020-09-23 15:23:12 +10:00
Nigel Tao
0987296352
Fix parse_number_f64_eisel_lemire comment typos
2020-09-15 22:25:33 +10:00
Nigel Tao
f2be4dd7cf
Trim private_implementation__powers_of_10 array
...
Binary size, before:
30344 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
30488 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
31992 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
31992 gen/lib/c/gcc-static/wuffs-base-floatconv.o
After:
29512 gen/lib/c/clang-9-dynamic/wuffs-base-floatconv.lo
29656 gen/lib/c/clang-9-static/wuffs-base-floatconv.o
31160 gen/lib/c/gcc-dynamic/wuffs-base-floatconv.lo
31160 gen/lib/c/gcc-static/wuffs-base-floatconv.o
2020-09-15 22:14:30 +10:00
Nigel Tao
8b45db0120
Narrow parse_number_f64_eisel_lemire's exp10 arg
...
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file
from github.com/zemirco/sf-city-lots-json:
$ g++ -O3 script/process-json-numbers.c
$ time ./a.out -parse-number-f64 < citylots.json
Before/After:
real 0m0.995s
real 0m0.968s
2020-09-15 21:58:57 +10:00
Nigel Tao
339119a5c1
Simplify parse_number_f64's use of __uint128_t
2020-09-14 12:43:29 +10:00
Nigel Tao
9f22b5ebf7
Fix wuffs_base__parse_number_f64 fast path comment
2020-09-11 09:10:08 +10:00
Nigel Tao
b55d539d94
Add links to jsonptr blog post
2020-09-11 08:11:02 +10:00
Nigel Tao
1710c81f13
Let wuffs_base__multiply_u64 use __uint128_t
2020-09-10 21:23:25 +10:00
Nigel Tao
0a141a7f1a
Put multiply_u64__output in little-endian order
2020-09-10 21:12:45 +10:00
Nigel Tao
57d47c633c
Fix etc__high_prec_dec__to_f64 shift amount
...
Shifting 0.299 left by 2 doesn't put us in [½ .. 1].
2020-09-08 16:43:31 +10:00
Nigel Tao
6c13877688
Drop WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_X_AS_BYTES
...
We can always add it back later if there's demand for it.
2020-08-30 16:15:35 +10:00
Nigel Tao
6069ebd619
Rename {read,writ}er_io_position
2020-08-27 23:32:53 +10:00
Nigel Tao
3832b04c93
Tweak wuffs_base__io_buffer_meta.pos comment
2020-08-26 10:29:17 +10:00
Nigel Tao
63e6796896
Add "4Ki tokens is 32KiB" comment
2020-08-26 00:00:32 +10:00
Nigel Tao
fc304139af
Add WUFFS_BASE__TOKEN__VBD__FILLER__COMMENT_ANY
2020-08-19 09:40:02 +10:00
Nigel Tao
4284369bb8
Add TOKEN__VBD__FILLER__PUNCTUATION
2020-08-17 16:48:30 +10:00
Nigel Tao
ca1113620b
Let wuffs_aux's MemoryInput take a char* ptr
2020-08-17 10:00:19 +10:00
Nigel Tao
2742a4f4be
Have wuffs_aux take lvalue (not rvalue) references
2020-08-17 00:02:49 +10:00
Nigel Tao
d384e1e458
Avoid wuffs_aux macro's unused variable token_ptr
2020-08-13 00:13:12 +10:00
Nigel Tao
b21a82bbcd
Add some section breaks to auxiliary/json.cc
2020-08-13 00:09:28 +10:00
Nigel Tao
b3438434ca
Add json QUIRK_JSON_POINTER_ALLOW_TILDE_R_TILDE_N
2020-08-13 00:06:56 +10:00
Nigel Tao
8aac6767bb
Add example/jsonfindptrs -query=STR flag
2020-08-12 23:18:37 +10:00
Nigel Tao
ab6f895007
Extract WUFFS_AUX__DECODE_JSON__GET_THE_NEXT_TOKEN
2020-08-11 22:10:46 +10:00
Nigel Tao
da3504833e
Have Decode{Cbor,Json} quirks default to empty
2020-08-11 13:46:50 +10:00
Nigel Tao
62c4feb268
Let wuffs_aux::DecodeJson use BACKSLASH_X_AS_BYTES
2020-08-10 15:22:05 +10:00
Nigel Tao
6d81764e14
Tweak wuffs_aux::DecodeJsonCallbacks
2020-08-09 23:15:41 +10:00
Nigel Tao
0b7eaf291b
Add example/cbor-to-json
2020-08-09 23:03:42 +10:00
Nigel Tao
934136b09c
Add token_buffer.{read,writ}er_slice methods
2020-08-06 23:51:13 +10:00
Nigel Tao
82a96cb139
Rename token_buffer.{read,writ}er_available
2020-08-06 23:41:36 +10:00
Nigel Tao
724ce98540
Update some refs to the old aux directory name
2020-08-06 09:17:54 +10:00
Mike Kaufman
c8c2144579
updating refs to new auxiliary folder
2020-08-05 09:16:35 -07:00
Nigel Tao
6ea09e0de4
Remove #ifdef MODULE_ETC guards for aux headers
2020-08-05 22:54:53 +10:00
Nigel Tao
cf6c578973
Add aux library
2020-08-04 23:43:38 +10:00
Nigel Tao
cb130ba83e
Re-organize internal/cgen/data's base files list
2020-07-28 14:09:50 +10:00
Nigel Tao
d6a10dfe8a
Add io_buffer.{read,writ}er_slice methods
2020-07-27 11:47:47 +10:00
Nigel Tao
702c7b299f
Let wuffs_base__utf_8__etc take ptr-to-const-u8
2020-07-22 15:42:54 +10:00
Nigel Tao
850dc18d16
Have std/cbor produce extended inline integers
2020-07-21 22:52:04 +10:00
Nigel Tao
c9d4e34dfc
Split ETC__VBC__INLINE_INTEGER into {,un}signed
2020-07-21 15:31:49 +10:00
Nigel Tao
c4fa8e27c0
Rename the "Eisel" algorithm to "Eisel-Lemire"
2020-07-18 17:35:13 +10:00
Nigel Tao
f52e081f1e
Add WUFFS_BASE__X64__BYTE_LENGTH__MAX_INCL comment
2020-07-16 21:30:01 +10:00
Nigel Tao
4e193599ac
Add std/cbor
2020-07-15 14:08:37 +10:00
Nigel Tao
e917884d6c
Add wuffs_base__base_16__encodeN
2020-07-14 16:35:13 +10:00
Nigel Tao
56d9096f81
Fix -Werror=conversion in from_f64_to_u{16,32}
2020-07-12 21:11:49 +10:00
Nigel Tao
a3931d5215
Rename IEEE 754 from_f64_to_u{16,32} functions
2020-07-12 21:06:44 +10:00
Nigel Tao
0d90b270ea
Reorganize internal/cgen/base/strconv-public.h
2020-07-12 17:03:53 +10:00
Nigel Tao
7bf7cf28b9
Add IEEE 754 from_f64_to_u{16,32} functions
2020-07-12 17:01:14 +10:00
Nigel Tao
0899b82c42
Add IEEE 754 from_u{16,32}_to_f64 functions
2020-07-12 13:23:04 +10:00