mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Call decode_huffman_fast more often
name old speed new speed delta wuffs_deflate_decode_1k/clang5 137MB/s ± 0% 139MB/s ± 0% +1.19% (p=0.008 n=5+5) wuffs_deflate_decode_10k/clang5 219MB/s ± 0% 224MB/s ± 0% +2.59% (p=0.008 n=5+5) wuffs_deflate_decode_100k_just_one_read/clang5 257MB/s ± 0% 265MB/s ± 0% +3.41% (p=0.008 n=5+5) wuffs_deflate_decode_100k_many_big_reads/clang5 181MB/s ± 0% 220MB/s ± 0% +21.72% (p=0.008 n=5+5) wuffs_deflate_decode_1k/gcc7 157MB/s ± 0% 156MB/s ± 1% -0.63% (p=0.032 n=5+5) wuffs_deflate_decode_10k/gcc7 263MB/s ± 1% 269MB/s ± 0% +2.39% (p=0.008 n=5+5) wuffs_deflate_decode_100k_just_one_read/gcc7 310MB/s ± 1% 314MB/s ± 0% +1.27% (p=0.008 n=5+5) wuffs_deflate_decode_100k_many_big_reads/gcc7 158MB/s ± 1% 254MB/s ± 0% +61.29% (p=0.008 n=5+5)
This commit is contained in:
1 parent
2fd03f42b5
commit
c6a48b3731
4 files changed
+15
-22
No files matched your search
@@ -27,7 +27,6 @@ pub status "?missing end-of-block code"
|
||||
pub status "?no Huffman codes"
|
||||
|
||||
pri status "?internal error: inconsistent Huffman decoder state"
|
||||
pri status "?internal error: inconsistent Huffman end_of_block"
|
||||
pri status "?internal error: inconsistent I/O"
|
||||
pri status "?internal error: inconsistent distance"
|
||||
pri status "?internal error: inconsistent n_bits"
|
||||
@@ -230,7 +229,6 @@ pri func decoder.decode_blocks?(dst base.io_writer, src base.io_reader) {
|
||||
if this.end_of_block {
|
||||
continue:outer
|
||||
}
|
||||
return "?internal error: inconsistent Huffman end_of_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader) {
|
||||
lmask = ((1 as base.u32) << this.n_huffs_bits[0]) - 1
|
||||
dmask = ((1 as base.u32) << this.n_huffs_bits[1]) - 1
|
||||
|
||||
while:loop true {
|
||||
while:loop not coroutine_resumed {
|
||||
// Decode an lcode symbol from H-L.
|
||||
while true {
|
||||
table_entry = this.huffs[0][bits & lmask]
|
||||
|
||||
Reference in new issue
Block a user