Nigel Tao
10e8ee5e79
Roll back 0c7a8cc0 re do_bench_image_decode
...
Commit 0c7a8cc029 is "Have
do_bench_image_decode pass a non-NULL dst". Adding a mandatory memcpy to
do_bench_image_decode noticably slowed down the bench numbers. Removing
the memcpy speeds it back up.
wuffs_gif_decode_1k_bw/clang9 278MB/s ± 0% 373MB/s ± 0% +34.42% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang9 85.0MB/s ± 0% 91.1MB/s ± 0% +7.27% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang9 104MB/s ± 0% 114MB/s ± 0% +9.51% (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang9 434MB/s ± 0% 449MB/s ± 0% +3.59% (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang9 115MB/s ± 0% 120MB/s ± 0% +4.63% (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang9 140MB/s ± 1% 145MB/s ± 0% +3.16% (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang9 301MB/s ± 0% 312MB/s ± 0% +3.62% (p=0.016 n=5+4)
wuffs_gif_decode_100k_realistic/clang9 125MB/s ± 0% 127MB/s ± 0% +1.40% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/clang9 128MB/s ± 0% 129MB/s ± 0% +0.78% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/clang9 128MB/s ± 0% 128MB/s ± 1% ~ (p=0.151 n=5+5)
wuffs_gif_decode_anim_screencap/clang9 586MB/s ± 0% 671MB/s ± 0% +14.60% (p=0.016 n=5+4)
wuffs_gif_decode_1k_bw/gcc10 271MB/s ± 0% 322MB/s ± 0% +18.81% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/gcc10 94.8MB/s ± 0% 99.2MB/s ± 1% +4.64% (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc10 116MB/s ± 0% 123MB/s ± 0% +5.90% (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc10 374MB/s ± 0% 382MB/s ± 1% +2.12% (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/gcc10 116MB/s ± 1% 119MB/s ± 0% +3.09% (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc10 137MB/s ± 0% 139MB/s ± 0% +1.46% (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc10 286MB/s ± 0% 293MB/s ± 0% +2.49% (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/gcc10 118MB/s ± 0% 119MB/s ± 0% +0.80% (p=0.016 n=5+4)
wuffs_gif_decode_1000k_full_init/gcc10 121MB/s ± 0% 121MB/s ± 0% +0.33% (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc10 121MB/s ± 0% 121MB/s ± 0% +0.28% (p=0.016 n=5+5)
wuffs_gif_decode_anim_screencap/gcc10 582MB/s ± 0% 659MB/s ± 0% +13.25% (p=0.008 n=5+5)
wuffs_png_decode_19k_8bpp/clang9 88.7MB/s ± 0% 94.2MB/s ± 0% +6.28% (p=0.008 n=5+5)
wuffs_png_decode_40k_24bpp/clang9 104MB/s ± 0% 108MB/s ± 0% +3.96% (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/clang9 335MB/s ± 0% 352MB/s ± 0% +5.29% (p=0.008 n=5+5)
wuffs_png_decode_552k_32bpp/clang9 118MB/s ± 0% 119MB/s ± 0% +0.54% (p=0.008 n=5+5)
wuffs_png_decode_4002k_24bpp/clang9 109MB/s ± 0% 112MB/s ± 0% +2.36% (p=0.008 n=5+5)
wuffs_png_decode_19k_8bpp/gcc10 96.7MB/s ± 0% 98.0MB/s ± 0% +1.36% (p=0.029 n=4+4)
wuffs_png_decode_40k_24bpp/gcc10 114MB/s ± 0% 115MB/s ± 0% +0.79% (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/gcc10 316MB/s ± 0% 320MB/s ± 0% +1.18% (p=0.016 n=5+4)
wuffs_png_decode_552k_32bpp/gcc10 149MB/s ± 0% 149MB/s ± 0% +0.17% (p=0.016 n=5+4)
wuffs_png_decode_4002k_24bpp/gcc10 116MB/s ± 0% 116MB/s ± 0% +0.09% (p=0.032 n=5+5)
2020-12-29 21:29:32 +11:00
Nigel Tao
0976467a32
Add std/png decode filter benches
2020-12-29 13:40:40 +11:00
Nigel Tao
d1c561cb19
Fix std/png Average filter for the top row
2020-12-28 22:24:03 +11:00
Nigel Tao
0c7a8cc029
Have do_bench_image_decode pass a non-NULL dst
2020-12-28 15:54:15 +11:00
Nigel Tao
88616cc969
Add std/png mimic benches
...
Wuffs' std/png and std/zlib implementations have not been optimized yet,
but even at this early stage, they are roughly on par with their
"mimics": equivalent production-quality C libraries (libpng and zlib).
On a mid-range x86_64 laptop:
wuffs_png_decode_19k_8bpp/clang9 95.8MB/s ± 0%
wuffs_png_decode_40k_24bpp/clang9 100MB/s ± 1%
wuffs_png_decode_77k_8bpp/clang9 359MB/s ± 0%
wuffs_png_decode_552k_32bpp/clang9 119MB/s ± 0%
wuffs_png_decode_4002k_24bpp/clang9 101MB/s ± 0%
wuffs_png_decode_19k_8bpp/gcc10 97.2MB/s ± 0%
wuffs_png_decode_40k_24bpp/gcc10 111MB/s ± 0%
wuffs_png_decode_77k_8bpp/gcc10 316MB/s ± 0%
wuffs_png_decode_552k_32bpp/gcc10 132MB/s ± 0%
wuffs_png_decode_4002k_24bpp/gcc10 116MB/s ± 0%
mimic_png_decode_19k_8bpp 58.1MB/s ± 0%
mimic_png_decode_40k_24bpp 73.3MB/s ± 0%
mimic_png_decode_77k_8bpp 177MB/s ± 0%
mimic_png_decode_552k_32bpp 147MB/s ± 0%
mimic_png_decode_4002k_24bpp 104MB/s ± 0%
wuffs_zlib_decode_10k/clang9 126MB/s ± 0%
wuffs_zlib_decode_100k/clang9 136MB/s ± 0%
wuffs_zlib_decode_10k/gcc10 131MB/s ± 0%
wuffs_zlib_decode_100k/gcc10 159MB/s ± 0%
mimic_zlib_decode_10k 133MB/s ± 0%
mimic_zlib_decode_100k 160MB/s ± 0%
2020-12-28 15:52:46 +11:00
Nigel Tao
0eca0b85c8
Add std/png benches
2020-12-26 22:14:34 +11:00
Nigel Tao
c4ce7ae6c7
Add "NIE Tests" comment
2020-12-26 22:02:46 +11:00
Nigel Tao
4ff1429553
Add std/png filter_and_swizzle
2020-12-25 18:35:19 +11:00
Nigel Tao
58c30e9d6d
Add std/png
2020-12-24 13:10:29 +11:00
Nigel Tao
1197e86616
Add std/nie
2020-12-23 14:53:56 +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
9399c82409
Have non-animated image decoders give EOD earlier
2020-12-19 22:03:22 +11:00
Nigel Tao
695a6815b1
Remove gif.config_decoder
...
The original motivation (having a low-featured low-memory decoder just
for counting GIF frames) is obsolete: https://crbug.com/1132828
Binary size, before:
42264 gen/lib/c/clang-9-dynamic/wuffs-std-gif.lo
42392 gen/lib/c/clang-9-static/wuffs-std-gif.o
44824 gen/lib/c/gcc-dynamic/wuffs-std-gif.lo
45624 gen/lib/c/gcc-static/wuffs-std-gif.o
After:
26736 gen/lib/c/clang-9-dynamic/wuffs-std-gif.lo
26712 gen/lib/c/clang-9-static/wuffs-std-gif.o
27976 gen/lib/c/gcc-dynamic/wuffs-std-gif.lo
28392 gen/lib/c/gcc-static/wuffs-std-gif.o
2020-12-18 22:06:08 +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
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
ba3818cb6b
Add more parse_number_f64 test cases
2020-09-28 12:51:45 +10:00
Nigel Tao
6c2fb9a2fd
Tweak test/data/artif*/gif-transparent-index.gif
2020-09-27 00:09:25 +10:00
Nigel Tao
344123b179
Add test/data/artificial/gif-transparent-index.gif
2020-09-25 23:01:43 +10:00
Nigel Tao
cd4cbc9102
Tweak JSON trailing comment/new-line quirks
2020-09-22 23:03:49 +10:00
Nigel Tao
fa50f4de67
Add json QUIRK_ALLOW_TRAILING_COMMENT
2020-09-21 11:24:22 +10:00
Nigel Tao
ddac2c50ee
Add more {parse,render}_number_f64 test cases
2020-09-15 21:17:33 +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
4284369bb8
Add TOKEN__VBD__FILLER__PUNCTUATION
2020-08-17 16:48:30 +10:00
Nigel Tao
2de1dfec97
Fix test/data/cbor*tokens losing DEFINITELY_ASCII
...
The change to the golden file was mistakenly left out of 2397d029 "Fix
std/cbor UTF-8 strings aren't always ASCII".
2020-08-12 23:32:40 +10:00
Nigel Tao
0091a2132d
Have std/cbor reject tags before an 0xFF stop code
2020-08-10 21:39:37 +10:00
Nigel Tao
9497b174c9
Add test_wuffs_cbor_decode_{in,}valid
2020-08-10 21:22:47 +10:00
Nigel Tao
0b7eaf291b
Add example/cbor-to-json
2020-08-09 23:03:42 +10:00
Nigel Tao
1adbc9547f
Split std/json's QUIRK_ALLOW_BACKSLASH_X in two
2020-08-06 23:28:07 +10:00
Nigel Tao
1e96ef200c
Add test/data/cbor-rfc-7049-examples.*
2020-07-27 22:00:28 +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
4e193599ac
Add std/cbor
2020-07-15 14:08:37 +10:00
Nigel Tao
168f60a781
Add example/jsonptr -output-format=cbor flag
2020-07-14 15:57:05 +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
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
Nigel Tao
4d449dc663
Rename ieee_754_bit_representation functions
2020-07-12 11:00:47 +10:00
Nigel Tao
0a9075f81c
Move test_wuffs_strconv_parse_number_f64_options
2020-07-11 13:17:58 +10:00
Nigel Tao
37bc8cdaa5
Refactor parse_number_f64 related tests
2020-07-11 13:16:00 +10:00
Nigel Tao
c5c9885db4
Add PARSE_NUMBER_XXX__ALLOW_UNDERSCORES
2020-07-11 13:10:14 +10:00
Nigel Tao
e82bc8ec7b
Add PARSE_NUMBER_XXX__ALLOW_MULTIPLE_LEADING_Z...
2020-07-11 12:57:25 +10:00
Nigel Tao
4d61a056e0
Add PARSE_NUMBER_FXX__REJECT_INF_AND_NAN
2020-07-11 12:34:40 +10:00
Nigel Tao
e0c5de9d8d
Add PARSE_NUMBER_FXX__DECIMAL_SEPARATOR_IS_A_COMMA
2020-07-11 12:14:39 +10:00
Nigel Tao
e0ca5a4c3c
Have base_16 codec return a transform__output
2020-07-09 21:09:19 +10:00
Nigel Tao
309a5ba231
Add base_64 codec to wuffs_base
2020-07-09 20:42:17 +10:00
Nigel Tao
84bb3afd87
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.
2020-07-07 23:29:30 +10:00
Nigel Tao
b9f69264a0
Raise json.DECODER_NUMBER_LENGTH_MAX_INCL to 2047
2020-07-07 23:08:11 +10:00
Nigel Tao
6b7ce30e32
Add wuffs_base__parse_number_xxx options arg
2020-07-07 16:19:46 +10:00
Nigel Tao
832edf7227
Remove the medium_prec_bin type
...
It's obsolete now that we have an Eisel algorithm implementation.
Binary size, before:
29416 gen/lib/c/clang-5.0-dynamic/wuffs-base-f64conv.lo
29688 gen/lib/c/clang-5.0-static/wuffs-base-f64conv.o
31792 gen/lib/c/gcc-dynamic/wuffs-base-f64conv.lo
31792 gen/lib/c/gcc-static/wuffs-base-f64conv.o
After:
28744 gen/lib/c/clang-5.0-dynamic/wuffs-base-f64conv.lo
28968 gen/lib/c/clang-5.0-static/wuffs-base-f64conv.o
31176 gen/lib/c/gcc-dynamic/wuffs-base-f64conv.lo
31176 gen/lib/c/gcc-static/wuffs-base-f64conv.o
Processing citylots.json 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.031s
real 0m0.975s
$ time ./a.out < citylots.json
Before/After:
real 0m0.807s
real 0m0.729s
2020-07-07 16:07:35 +10:00