Commit Graph
372 Commits
Author SHA1 Message Date
Nigel Tao a1a70da539 Add iterate advance parameter 2021-01-11 00:03:44 +11:00
Nigel Tao 2b17cf72ca Fix uint64_t vs size_t when compiling with -m32 2021-01-08 23:07:07 +11:00
Nigel Tao dcdd7928c1 Let iterate have multiple assigns
wuffs_png_decode_19k_8bpp/clang9          92.2MB/s ± 0%  93.4MB/s ± 0%   +1.33%  (p=0.008 n=5+5)
wuffs_png_decode_40k_24bpp/clang9          116MB/s ± 0%   115MB/s ± 0%     ~     (p=1.000 n=5+5)
wuffs_png_decode_77k_8bpp/clang9           347MB/s ± 0%   351MB/s ± 0%   +1.19%  (p=0.016 n=5+4)
wuffs_png_decode_552k_32bpp/clang9         150MB/s ± 0%   156MB/s ± 0%   +3.57%  (p=0.008 n=5+5)
wuffs_png_decode_4002k_24bpp/clang9        117MB/s ± 1%   118MB/s ± 0%   +0.62%  (p=0.008 n=5+5)

wuffs_png_decode_filter_1_sub/clang9      1.34GB/s ± 0%  1.24GB/s ± 0%   -7.30%  (p=0.008 n=5+5)
wuffs_png_decode_filter_2_up/clang9       13.3GB/s ± 0%  13.4GB/s ± 0%   +0.96%  (p=0.008 n=5+5)
wuffs_png_decode_filter_3_average/clang9   754MB/s ± 0%   948MB/s ± 0%  +25.62%  (p=0.008 n=5+5)
wuffs_png_decode_filter_4_paeth/clang9     127MB/s ± 0%   138MB/s ± 0%   +9.01%  (p=0.008 n=5+5)

wuffs_png_decode_19k_8bpp/gcc10            100MB/s ± 1%   100MB/s ± 0%     ~     (p=0.690 n=5+5)
wuffs_png_decode_40k_24bpp/gcc10           114MB/s ± 0%   118MB/s ± 0%   +3.21%  (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/gcc10            323MB/s ± 2%   325MB/s ± 0%     ~     (p=0.841 n=5+5)
wuffs_png_decode_552k_32bpp/gcc10          159MB/s ± 0%   172MB/s ± 0%   +8.38%  (p=0.008 n=5+5)
wuffs_png_decode_4002k_24bpp/gcc10         118MB/s ± 0%   118MB/s ± 0%     ~     (p=0.056 n=5+5)

wuffs_png_decode_filter_1_sub/gcc10       1.84GB/s ± 1%  1.85GB/s ± 0%   +0.22%  (p=0.008 n=5+5)
wuffs_png_decode_filter_2_up/gcc10        10.5GB/s ± 0%  10.5GB/s ± 0%     ~     (p=0.310 n=5+5)
wuffs_png_decode_filter_3_average/gcc10    743MB/s ± 0%  1008MB/s ± 0%  +35.66%  (p=0.008 n=5+5)
wuffs_png_decode_filter_4_paeth/gcc10     83.1MB/s ± 0%  94.1MB/s ± 0%  +13.15%  (p=0.008 n=5+5)
2021-01-07 23:40:50 +11:00
Nigel Tao d842a20e43 Let iterate parameters be non-powers-of-2 2021-01-07 22:48:31 +11:00
Nigel Tao beaf3ef11f Add choose
wuffs_png_decode_filter_1_sub/clang9       905MB/s ± 0%  1339MB/s ± 0%  +48.05%  (p=0.008 n=5+5)
wuffs_png_decode_filter_1_sub/gcc10       1.12GB/s ± 0%  1.85GB/s ± 0%  +64.80%  (p=0.016 n=5+4)
2021-01-06 23:16:16 +11:00
Nigel Tao 364c396ae8 Have cgen.go call aNode.Public() more often 2021-01-04 23:26:32 +11:00
Nigel Tao 81c6437e09 Add choosy 2021-01-04 23:20:41 +11:00
Nigel Tao b4dcc4e5ed Support swizzle from PIXEL_FORMAT__Y to same 2020-12-26 22:11:11 +11:00
Nigel Tao 43a74d6b81 Apply io_limit to original not just derived vars 2020-12-24 22:45:31 +11:00
Nigel Tao b81999f9fc Restrict an io_bind io arg to local variables only 2020-12-24 14:11:48 +11:00
Nigel Tao 78c7087eee Implement io_limit 2020-12-24 14:01:48 +11:00
Nigel Tao 332fb46b5c Remove std/nie decoder.swizzle derived var hack 2020-12-23 15:34:42 +11:00
Nigel Tao f6d11c78da Add ast.Expr IsArgsDotFoo and IsMethodCall methods 2020-12-23 15:13:14 +11:00
Nigel Tao 5a387fe090 Swizzler support for src_pixfmt = RGB|A_NONPREMUL
Binary size, before:
21520 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
22536 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
34488 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
34408 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
25712 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
26800 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
42816 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
42768 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-12-20 21:50:37 +11:00
Nigel Tao c79129a853 Restore deprecated {reader,writer}_io_position 2020-12-15 16:23:02 +11:00
Nigel Tao 8a12a64754 Add limited_swizzle_u32_interleaved_from_reader 2020-12-12 00:28:16 +11:00
Nigel Tao 8ee76df4f5 Add swizzle_interleaved_transparent_black decl 2020-12-11 14:22:53 +11:00
Nigel Tao 0ccdece50a Add swizzle_interleaved_transparent_black 2020-12-04 22:53:59 +11:00
Nigel Tao 0c481fe7c6 Improve cgen for constant-indexed slices of arrays 2020-12-02 22:39:34 +11:00
Nigel Tao 8482161c91 Add base.pixel_buffer.palette_or_else 2020-12-02 22:13:35 +11:00
Nigel Tao 50a0e767d4 Fix -Werror=conversion in base/image-public.h 2020-11-24 09:02:43 +11:00
Nigel Tao ac930b801b Swizzler support for src_pixfmt = BGRX
Binary size, before:
18520 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
19200 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
30256 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
30192 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
20440 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
21200 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
33424 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
33384 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-11-16 21:51:42 +11:00
Nigel Tao 6b69425247 Don't unroll pixel_swizzler 4x8 4x16le conversion
Binary size, before:
18712 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
19392 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
36880 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
36824 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
18520 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
19200 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
30256 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
30192 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-11-16 18:59:52 +11:00
Nigel Tao 4a5df43aeb Add PIXEL_FORMAT__BGRA_NONPREMUL_4X16LE
Binary size, before:
14272 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
14760 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
22336 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
22280 gen/lib/c/gcc-static/wuffs-base-pixconv.o

After:
18712 gen/lib/c/clang-9-dynamic/wuffs-base-pixconv.lo
19392 gen/lib/c/clang-9-static/wuffs-base-pixconv.o
36880 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
36824 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-11-16 15:23:57 +11:00
Nigel Tao 904004e79a Let non-strict JSON Pointer syntax allow "~t" 2020-11-15 20:56:04 +11:00
Nigel Tao 42d569f5db Refactor cgen's write{Load,Save}DerivedVar 2020-11-13 22:42:41 +11:00
Nigel Tao 55caff6f95 Remove some hard-coded a_dst/a_src names in cgen 2020-11-12 23:36:37 +11:00
Nigel Tao 7ea23d56e3 Refactor cgen's writeStatementAssign 2020-11-11 23:20:08 +11:00
Nigel Tao 0566cb2a8e Remove obsolete writeStatementAssign0 return value 2020-11-11 22:28:59 +11:00
Nigel Tao feac89519f Rearrange cgen temporary assignment for =? 2020-11-11 22:05:46 +11:00
Nigel Tao b3c793eef0 Remove obsolete cgen of Optional effects
This if-else branch was obsoleted by commit 1ea32b37.
2020-11-09 22:16:00 +11:00
Nigel Tao ce685a647d Fix hpd__small_rshift clobbering the negative bit
Also link to the Simple Decimal Conversion blog post.
2020-11-03 15:24:02 +11:00
Nigel Tao abedb38844 Delete deprecated wuffs_base__animation_blend 2020-10-09 21:36:07 +11:00
Nigel Tao fef7967e08 Delete deprecated {reader,writer}_io_position 2020-10-09 21:29:11 +11:00
Nigel Tao 1d8d18f400 Add link to Eisel-Lemire blog post 2020-10-07 22:13:51 +11:00
Nigel Tao ba3818cb6b Add more parse_number_f64 test cases 2020-09-28 12:51:45 +10:00
Nigel Tao 3bb5af905f Add more "typedef struct { ... } foo" names 2020-09-24 11:20:24 +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