Commit Graph
30 Commits
Author SHA1 Message Date
Nigel Tao 61635213cd Add "‼" to "WUFFS C HEADER ENDS HERE" comment 2021-03-25 14:11:23 +11:00
Nigel Tao 3c627574a7 Fix and tweak hand-written decode_huffman_fast 2021-02-10 16:02:05 +11:00
Nigel Tao f89c3d81bd Build fix for hand-written decode_huffman_fast 2021-01-29 09:08:25 +11:00
Nigel Tao 2914bae3b2 Re-format C function signatures 2020-02-26 09:40:30 +11:00
Nigel Tao 6a90728bc9 Build fix for hand-written decode_huffman_fast 2020-01-11 10:21:25 +11:00
Nigel Tao 69e9428c1b Fix pdst_mark for hand-written decode_huffman_fast 2019-10-06 16:58:49 +11:00
Nigel Tao df839b183f Build fix for hand-written decode_huffman_fast 2019-10-05 16:56:40 +10:00
Nigel Tao 5aeb98c701 Restore deflate.decoder.n_huffs_bits's refinement 2019-02-24 09:15:31 +11:00
Nigel Tao b075fcbed9 Build fix for hand-written decode_huffman_fast 2019-02-24 09:03:36 +11:00
Nigel Tao 670b45be53 Add some "horizontal rule" comment lines 2019-02-02 08:10:08 +11:00
Nigel Tao d076b6e800 Remove hand-written decode_huffman_fast type pun
Type punning is undefined behavior.
2019-01-26 10:48:14 +11:00
Nigel Tao b31ddaa052 Make hand-written decode_huffman_fast standalone 2019-01-26 10:19:53 +11:00
Nigel Tao 6326479e81 Have hand-written decode_huffman_fast copy history
This makes it pass "wuffs test -skipgen std/deflate".
2019-01-19 12:13:09 +11:00
Nigel Tao cf52415f9f Have hand-written decode_huffman_fast obey limits
This makes it pass "wuffs test -skipgen std/deflate".
2019-01-13 09:00:37 +11:00
Nigel Tao dea71ad324 Update wuffs-deflate-decoder-decode-huffman.c 2019-01-13 08:33:40 +11:00
Nigel Tao dd94ad3821 Rename z variable to status, in C code 2018-12-28 16:14:03 +11:00
Nigel Tao 3e70383c6c Remove some if's from deflate.decode_huffman_fast
name                             old speed     new speed     delta

wuffs_deflate_decode_1k/clang    145MB/s ± 0%  151MB/s ± 1%  +4.54%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/clang   234MB/s ± 0%  230MB/s ± 0%  -1.75%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/clang  263MB/s ± 0%  276MB/s ± 1%  +5.17%  (p=0.008 n=5+5)

wuffs_deflate_decode_1k/gcc      157MB/s ± 1%  157MB/s ± 0%    ~     (p=0.421 n=5+5)
wuffs_deflate_decode_10k/gcc     265MB/s ± 0%  259MB/s ± 0%  -2.16%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/gcc    313MB/s ± 0%  315MB/s ± 0%  +0.39%  (p=0.016 n=5+5)

wuffs_gzip_decode_10k/clang      216MB/s ± 0%  212MB/s ± 0%  -1.69%  (p=0.016 n=5+4)
wuffs_gzip_decode_100k/clang     241MB/s ± 0%  252MB/s ± 0%  +4.67%  (p=0.016 n=5+4)

wuffs_gzip_decode_10k/gcc        251MB/s ± 1%  248MB/s ± 1%  -1.05%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/gcc       285MB/s ± 1%  291MB/s ± 0%  +2.16%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/clang      213MB/s ± 0%  210MB/s ± 0%  -1.18%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/clang     239MB/s ± 0%  247MB/s ± 0%  +3.08%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/gcc        244MB/s ± 0%  247MB/s ± 0%  +1.15%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/gcc       282MB/s ± 0%  291MB/s ± 0%  +2.90%  (p=0.008 n=5+5)
2018-12-01 10:26:09 +11:00
Nigel Tao b68830e292 Add a MASK macro, for hand-written C 2018-10-13 11:43:02 +11:00
Nigel Tao ecd7152581 Fix a comment typo from the previous commit 2018-10-13 11:33:47 +11:00
Nigel Tao 07151f88ce Copy Huffman optimizations, for hand-written C 2018-10-07 18:24:53 +11:00
Nigel Tao d1758d7a1c Update wuffs-deflate-decoder-decode-huffman.c 2018-09-15 15:05:43 +10:00
Nigel Tao 0c18c064b8 Update wuffs-deflate-decoder-decode-huffman.c 2018-08-26 12:47:44 +10:00
Nigel Tao 7c2993f786 Update wuffs-deflate-decoder-decode-huffman.c 2018-08-04 15:43:09 +10:00
Nigel Tao fdb7d7f174 Add !! to the magic "C HEADER ENDS HERE" string 2018-06-16 09:04:34 +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 4675efdcc5 Fix deflate decode when the distance is 32768 2018-03-23 12:49:42 +11:00
Nigel Tao 39bc8688f6 Mask Huffman bits faster, for hand-written C
Benchmark numbers are better for gcc and worse for clang, but clang 3.8
is also relatively old. Given gcc's speeds, it's arguably a clang
codegen bug, or at least it should be clang's aspirational target.

name                             old speed     new speed     delta
wuffs_deflate_decode_1k/clang    142MB/s ± 1%  135MB/s ± 1%  -4.54%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/clang   295MB/s ± 0%  291MB/s ± 0%  -1.09%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/clang  354MB/s ± 1%  342MB/s ± 0%  -3.48%  (p=0.008 n=5+5)
wuffs_deflate_decode_1k/gcc      153MB/s ± 1%  156MB/s ± 1%  +1.51%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/gcc     354MB/s ± 1%  371MB/s ± 0%  +4.92%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/gcc    468MB/s ± 2%  499MB/s ± 1%  +6.64%  (p=0.008 n=5+5)

Note that these are benchmark numbers for an 'ideal', hand-written C
implementation, not for Wuffs' generated C code.
2018-02-22 15:53:42 +11:00
Nigel Tao 68e972c551 Load Huffman bits faster, for hand-written C
Benchmark numbers are better for gcc and worse for clang, but clang 3.8
is also relatively old. Given gcc's speeds, it's arguably a clang
codegen bug, or at least it should be clang's aspirational target.

name                             old speed     new speed     delta
wuffs_deflate_decode_1k/clang    157MB/s ± 1%  142MB/s ± 1%   -9.47%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/clang   313MB/s ± 0%  295MB/s ± 0%   -5.98%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/clang  403MB/s ± 1%  354MB/s ± 1%  -12.12%  (p=0.008 n=5+5)
wuffs_deflate_decode_1k/gcc      165MB/s ± 1%  153MB/s ± 1%   -6.93%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/gcc     337MB/s ± 0%  354MB/s ± 1%   +4.90%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k/gcc    440MB/s ± 0%  468MB/s ± 2%   +6.24%  (p=0.008 n=5+5)

Note that these are benchmark numbers for an 'ideal', hand-written C
implementation, not for Wuffs' generated C code.
2018-02-22 15:12:08 +11:00
Nigel Tao 36051062cb Update a script for the std/flate rename 2017-12-07 16:23:18 +11:00
Nigel Tao 802b9d8bfd Rename deflate-related scripts 2017-12-04 10:43:32 +11:00