mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
name old speed new speed delta wuffs_gif_decode_1k_bw/clang 306MB/s ± 0% 295MB/s ± 0% -3.62% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/clang 156MB/s ± 0% 163MB/s ± 0% +4.64% (p=0.008 n=5+5) wuffs_gif_decode_10k/clang 153MB/s ± 0% 179MB/s ± 0% +17.34% (p=0.008 n=5+5) wuffs_gif_decode_100k/clang 147MB/s ± 0% 155MB/s ± 0% +5.13% (p=0.008 n=5+5) wuffs_gif_decode_1000k/clang 151MB/s ± 1% 159MB/s ± 0% +5.34% (p=0.008 n=5+5) wuffs_gif_decode_1k_bw/gcc 319MB/s ± 0% 313MB/s ± 0% -1.79% (p=0.008 n=5+5) wuffs_gif_decode_1k_color/gcc 165MB/s ± 0% 173MB/s ± 0% +4.82% (p=0.008 n=5+5) wuffs_gif_decode_10k/gcc 171MB/s ± 1% 184MB/s ± 1% +7.48% (p=0.008 n=5+5) wuffs_gif_decode_100k/gcc 161MB/s ± 1% 173MB/s ± 1% +7.32% (p=0.008 n=5+5) wuffs_gif_decode_1000k/gcc 166MB/s ± 0% 179MB/s ± 1% +7.53% (p=0.008 n=5+5) wuffs_lzw_decode_20k/clang 167MB/s ± 0% 185MB/s ± 0% +10.85% (p=0.008 n=5+5) wuffs_lzw_decode_100k/clang 239MB/s ± 0% 260MB/s ± 0% +8.96% (p=0.008 n=5+5) wuffs_lzw_decode_20k/gcc 192MB/s ± 0% 211MB/s ± 0% +9.47% (p=0.008 n=5+5) wuffs_lzw_decode_100k/gcc 295MB/s ± 0% 300MB/s ± 0% +1.65% (p=0.008 n=5+5)
LZW (Lempel Ziv Welch) Compression
LZW is a general purpose compression algorithm, not specific to GIF, PDF, TIFF or even to graphics. In practice, there are two incompatible implementations, LSB (Least Significant Bits) and MSB (Most Significant Bits) first.
The GIF format uses LSB first. The literal width can vary between 2 and 8 bits, inclusive. There is no EarlyChange option.
The PDF and TIFF formats use MSB first. The literal width is fixed at 8 bits. There is an EarlyChange option that PDF sometimes uses (see Table 3.7 in the PDF 1.4 spec) and TIFF always uses.
TODO: refactor this README.md file and std/gif's one.