mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
This commit will soon be followed by a rollback, but it is committed anyway so that we can refer to these numbers in the git log. Avoiding the zero-initialization of the 32768-byte array avoids a fixed cost, regardless of e.g. the size of the decoded GIF image. A fixed absolute improvement is a bigger relative improvement for smaller GIFs. Compared to the previous commit: name old speed new speed delta wuffs_lzw_decode_20k/clang5 241MB/s ± 0% 247MB/s ± 0% +2.71% (p=0.008 n=5+5) wuffs_lzw_decode_100k/clang5 401MB/s ± 1% 407MB/s ± 0% +1.42% (p=0.008 n=5+5) wuffs_lzw_decode_20k/gcc7 235MB/s ± 0% 238MB/s ± 1% +1.21% (p=0.008 n=5+5) wuffs_lzw_decode_100k/gcc7 382MB/s ± 0% 384MB/s ± 0% ~ (p=0.095 n=5+5) wuffs_gif_decode_1k_bw/clang5 235MB/s ± 1% 318MB/s ± 0% +35.34% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/clang5 132MB/s ± 0% 154MB/s ± 0% +16.47% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/clang5 678MB/s ± 0% 697MB/s ± 1% +2.75% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/clang5 181MB/s ± 0% 186MB/s ± 0% +2.65% (p=0.008 n=5+5) wuffs_gif_decode_20k/clang5 226MB/s ± 0% 226MB/s ± 1% ~ (p=0.690 n=5+5) wuffs_gif_decode_100k_artificial/clang5 506MB/s ± 0% 508MB/s ± 1% ~ (p=0.222 n=5+5) wuffs_gif_decode_100k_realistic/clang5 203MB/s ± 1% 203MB/s ± 0% ~ (p=0.310 n=5+5) wuffs_gif_decode_1000k/clang5 206MB/s ± 0% 206MB/s ± 0% -0.26% (p=0.032 n=5+5) wuffs_gif_decode_anim_screencap/clang5 1.04GB/s ± 1% 1.03GB/s ± 0% ~ (p=0.151 n=5+5) wuffs_gif_decode_1k_bw/gcc7 255MB/s ± 1% 398MB/s ± 0% +56.43% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/gcc7 137MB/s ± 1% 161MB/s ± 0% +17.63% (p=0.008 n=5+5) wuffs_gif_decode_10k_bgra/gcc7 593MB/s ± 0% 604MB/s ± 1% +1.83% (p=0.008 n=5+5) wuffs_gif_decode_10k_indexed/gcc7 182MB/s ± 2% 187MB/s ± 1% +2.85% (p=0.008 n=5+5) wuffs_gif_decode_20k/gcc7 226MB/s ± 0% 227MB/s ± 0% +0.56% (p=0.032 n=5+5) wuffs_gif_decode_100k_artificial/gcc7 488MB/s ± 0% 492MB/s ± 0% +0.80% (p=0.008 n=5+5) wuffs_gif_decode_100k_realistic/gcc7 203MB/s ± 0% 201MB/s ± 0% -1.29% (p=0.008 n=5+5) wuffs_gif_decode_1000k/gcc7 207MB/s ± 0% 203MB/s ± 0% -2.17% (p=0.008 n=5+5) wuffs_gif_decode_anim_screencap/gcc7 1.03GB/s ± 0% 1.04GB/s ± 0% +0.67% (p=0.008 n=5+5)
Wuffs ships as a "single file C library", also known as a "header file library".
To use Wuffs in your C/C++ project, you just need to copy one file from this
directory, or otherwise integrate that one file into your build system.
Typically, pick the latest version (but not the unsupported snapshot), with a
filename like wuffs-vMAJOR.MINOR.c for version MAJOR.MINOR.
To use that single file as a "foo.c"-like implementation, instead of a
"foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
compiling it.