Nigel Tao
fd8025342e
Be able to test and bench the libspng library
...
That's libspng with an 's', instead of libpng without an 's'.
Wuffs' std/png and std/zlib implementations have not been fully
optimized yet, but as a snapshot, here's how it compares with these
"mimic" libraries, libspng and libpng.
On a mid-range x86_64 laptop:
Wuffs/clang9:
wuffs_png_decode_image_19k_8bpp/clang9 91.9MB/s ± 0%
wuffs_png_decode_image_40k_24bpp/clang9 128MB/s ± 0%
wuffs_png_decode_image_77k_8bpp/clang9 342MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 324MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 258MB/s ± 0%
wuffs_png_decode_image_4002k_24bpp/clang9 127MB/s ± 0%
Wuffs/gcc10:
wuffs_png_decode_image_19k_8bpp/gcc10 94.3MB/s ± 0%
wuffs_png_decode_image_40k_24bpp/gcc10 131MB/s ± 0%
wuffs_png_decode_image_77k_8bpp/gcc10 348MB/s ± 1%
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 319MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 269MB/s ± 0%
wuffs_png_decode_image_4002k_24bpp/gcc10 131MB/s ± 0%
libspng/clang9:
mimic_png_decode_image_19k_8bpp/clang9 59.3MB/s ± 1%
mimic_png_decode_image_40k_24bpp/clang9 78.4MB/s ± 0%
mimic_png_decode_image_77k_8bpp/clang9 189MB/s ± 0%
mimic_png_decode_image_552k_32bpp_ignore_checksum/clang9 235MB/s ± 0%
mimic_png_decode_image_552k_32bpp_verify_checksum/clang9 203MB/s ± 0%
mimic_png_decode_image_4002k_24bpp/clang9 110MB/s ± 0%
libspng/gcc10:
mimic_png_decode_image_19k_8bpp/gcc10 59.5MB/s ± 0%
mimic_png_decode_image_40k_24bpp/gcc10 77.6MB/s ± 0%
mimic_png_decode_image_77k_8bpp/gcc10 188MB/s ± 0%
mimic_png_decode_image_552k_32bpp_ignore_checksum/gcc10 223MB/s ± 0%
mimic_png_decode_image_552k_32bpp_verify_checksum/gcc10 193MB/s ± 0%
mimic_png_decode_image_4002k_24bpp/gcc10 109MB/s ± 0%
libpng (Debian_Testing_Bullseye /usr/lib/x86_64-linux-gnu/libpng.so):
mimic_png_decode_image_19k_8bpp 58.3MB/s ± 0%
mimic_png_decode_image_40k_24bpp 73.1MB/s ± 0%
mimic_png_decode_image_77k_8bpp 177MB/s ± 0%
mimic_png_decode_image_552k_32bpp_ignore_checksum skipped
mimic_png_decode_image_552k_32bpp_verify_checksum 146MB/s ± 0%
mimic_png_decode_image_4002k_24bpp 104MB/s ± 0%
2021-01-22 13:15:42 +11:00
Nigel Tao
170a810486
Add std/png benches for ignore/verify checksums
...
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 324MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 258MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 319MB/s ± 0%
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 269MB/s ± 0%
2021-01-22 11:34:52 +11:00
Nigel Tao
cf4aff9ef0
Have testlib image_decoder helpers take quirks
2021-01-21 22:29:30 +11:00
Nigel Tao
aa2d41e0a0
Add a mimiclib scratch buffer
2020-12-29 21:38:52 +11:00
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
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
2784613b49
Add n_bytes_out arg to gif bench functions
2020-06-01 13:14:14 +10:00
Nigel Tao
2914bae3b2
Re-format C function signatures
2020-02-26 09:40:30 +11:00
Nigel Tao
7b199116b0
Rename s/got/have/ in test/c
2020-02-24 21:23:58 +11:00
Nigel Tao
b92ea03889
Fix mimiclib/deflate-gzip-zlib.c build with miniz
2019-10-20 20:47:18 +11:00
Nigel Tao
c36b4d79c4
Add a mimic test for zlib dictionaries
2019-08-11 20:06:29 +10:00
Nigel Tao
881474be5a
Remove "0 means no I/O limit" in tests
2019-07-06 08:41:46 +10:00
Nigel Tao
ffeb2bff63
Split benchmarks for full / partial initialization
2019-02-24 16:54:19 +11:00
Nigel Tao
11a6819be9
Add a deflate distance-code-31 test
2019-02-02 13:04:09 +11:00
Nigel Tao
670b45be53
Add some "horizontal rule" comment lines
2019-02-02 08:10:08 +11:00
Nigel Tao
109d6f04bc
Add std/deflate many_big_read benchmarks
2019-01-13 10:08:40 +11:00
Nigel Tao
f1c5bb6cb7
Add BGRA GIF benchmark, not just indexed color
2018-12-08 21:24:26 +11:00
Nigel Tao
6fed251b40
Split an io_buffer's fields into data and meta
2018-09-15 08:45:50 +10:00
Nigel Tao
76c6af4ff4
Use some more animated GIF test data
2018-05-10 10:14:07 +10:00
Nigel Tao
97aab37462
Rename buf1, reader1, etc to io_buffer, io_reader
...
Also remove the unused Buf1, Buf2 and Usize tokens.
2018-04-05 20:49:48 +10:00
Nigel Tao
a2949fe28d
Add Adler32 and CRC32/IEEE tests for pi's digits
2018-03-25 21:54:07 +11:00
Nigel Tao
372618c817
Use the faster mimic_deflate API
...
name old speed new speed delta
mimic_deflate_decode_1k/gcc 217MB/s ± 1% 217MB/s ± 1% ~ (p=1.000 n=5+5)
mimic_deflate_decode_10k/gcc 260MB/s ± 2% 263MB/s ± 1% ~ (p=0.421 n=5+5)
mimic_deflate_decode_100k/gcc 277MB/s ± 1% 316MB/s ± 1% +13.95% (p=0.008 n=5+5)
Note that these numbers are for the C zlib library (these are "mimic"
numbers), not for the Wuffs code.
2018-01-05 18:22:25 +11:00
Nigel Tao
4877279ee7
Be able to test and bench the miniz library
...
For the record, benchstat numbers for 'old' being zlib-the-library and
'new' being miniz are below. Neither 'old' or 'new' is Wuffs code.
name old speed new speed delta
mimic_deflate_decode_1k/clang 217MB/s ± 1% 175MB/s ± 1% -19.54% (p=0.008 n=5+5)
mimic_deflate_decode_10k/clang 262MB/s ± 2% 222MB/s ± 0% -15.34% (p=0.008 n=5+5)
mimic_deflate_decode_100k/clang 281MB/s ± 1% 262MB/s ± 0% -6.86% (p=0.008 n=5+5)
mimic_deflate_decode_1k/gcc 220MB/s ± 1% 169MB/s ± 0% -23.12% (p=0.008 n=5+5)
mimic_deflate_decode_10k/gcc 267MB/s ± 0% 266MB/s ± 0% ~ (p=0.222 n=5+5)
mimic_deflate_decode_100k/gcc 283MB/s ± 0% 282MB/s ± 1% ~ (p=0.690 n=5+5)
mimic_zlib_decode_10k/clang 243MB/s ± 1% 197MB/s ± 1% -18.68% (p=0.008 n=5+5)
mimic_zlib_decode_100k/clang 287MB/s ± 1% 229MB/s ± 1% -20.13% (p=0.008 n=5+5)
mimic_zlib_decode_10k/gcc 243MB/s ± 0% 240MB/s ± 6% ~ (p=0.730 n=5+5)
mimic_zlib_decode_100k/gcc 288MB/s ± 1% 260MB/s ± 0% -9.51% (p=0.008 n=5+5)
2017-12-15 11:33:35 +11:00
Nigel Tao
1388f84e5c
Rename std/flate to std/deflate
2017-12-04 10:27:48 +11:00
Nigel Tao
d168e6977b
Rename test/c/mimiclib/flate.c
2017-12-03 14:34:41 +11:00
Nigel Tao
dd3f0b9ed4
Add a placeholder std/zlib package
2017-12-02 11:21:30 +11:00
Nigel Tao
3c708dfe59
Rename PUFFS to WUFFS, part 7 of N
2017-11-30 18:02:59 +11:00
Nigel Tao
79a94558be
Rename PUFFS to WUFFS, part 5 of N
2017-11-30 16:37:20 +11:00
Nigel Tao
94eba81892
Have mimiclib accept both giflib v4 and v5.
2017-11-03 11:35:16 +11:00
Nigel Tao
f29c4e278f
Follow the pkg__type__method convention for base.
2017-10-21 15:59:08 +11:00
Nigel Tao
f9cea5c17c
Fix the adler.update implementation.
2017-10-19 20:45:43 +11:00
Nigel Tao
fca0cab724
Add write and read limits to some tests.
2017-10-14 14:52:54 +11:00
Nigel Tao
d4372cb5b8
Change license to Apache 2.
...
Also remove explicit PATENTS file. The new LICENSE file already
discusses patents.
Note that the Puffs project has not yet been publicly released.
2017-10-12 11:17:41 +11:00
Nigel Tao
8be6dc3394
Add adler32 and crc32 benchmarks.
2017-07-14 13:01:08 +10:00
Nigel Tao
03572374dd
Add zlib (not just raw flate) benchmark.
2017-07-14 12:00:00 +10:00
Nigel Tao
6c8414099a
Add gzip (not just raw flate) benchmark.
2017-07-14 10:53:33 +10:00
Nigel Tao
fe96654119
Rename some tests and benches for consistency.
2017-07-07 12:37:15 +10:00
Nigel Tao
0b9f9162a5
Add std/flate tests.
2017-07-07 12:06:54 +10:00
Nigel Tao
004a583aaf
Add a comment about gif_mimic_DGifSlurp.
2017-07-02 13:26:42 +10:00
Nigel Tao
30f9c947f5
Roll back the custom gif_mimic_DGifSlurp function.
...
See the previous commit for the rationale.
2017-07-02 13:17:36 +10:00
Nigel Tao
ab7e0ae795
Add a custom gif_mimic_DGifSlurp function.
...
This avoids some malloc's of intermediate buffers when using giflib,
i.e. for mimic benchmarks. The numbers don't show a huge difference:
name old speed new speed delta
gif_mimic_decode_1k/clang 158MB/s ± 0% 158MB/s ± 2% ~ (p=0.421 n=5+5)
gif_mimic_decode_10k/clang 94.5MB/s ± 0% 93.8MB/s ± 1% -0.70% (p=0.016 n=5+5)
gif_mimic_decode_100k/clang 100MB/s ± 0% 100MB/s ± 0% -0.42% (p=0.008 n=5+5)
gif_mimic_decode_1000k/clang 102MB/s ± 0% 102MB/s ± 0% -0.29% (p=0.016 n=5+5)
gif_mimic_decode_1k/gcc 158MB/s ± 1% 160MB/s ± 0% +1.34% (p=0.008 n=5+5)
gif_mimic_decode_10k/gcc 94.3MB/s ± 0% 94.6MB/s ± 0% +0.36% (p=0.008 n=5+5)
gif_mimic_decode_100k/gcc 100MB/s ± 0% 101MB/s ± 0% +0.46% (p=0.008 n=5+5)
gif_mimic_decode_1000k/gcc 102MB/s ± 0% 103MB/s ± 0% +0.70% (p=0.008 n=5+5)
This commit will immediately be followed by a rollback, but it is
committed anyway so that we can refer to these numbers in the git log.
2017-07-02 13:12:45 +10:00
Nigel Tao
c06580a4f9
Fix a typo.
2017-07-02 12:53:56 +10:00
Nigel Tao
a65e2bacf0
Add mimic tests.
2017-07-02 11:19:23 +10:00