mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 08:47:28 +01:00
Unroll the copy_history32 loop.
name old speed new speed delta puffs_flate_decode_1k/clang 127MB/s ± 2% 140MB/s ± 0% +10.13% (p=0.000 n=83+95) puffs_flate_decode_10k/clang 151MB/s ± 1% 166MB/s ± 0% +10.38% (p=0.000 n=82+97) puffs_flate_decode_100k/clang 165MB/s ± 1% 177MB/s ± 0% +7.42% (p=0.000 n=89+94) puffs_flate_decode_1k/gcc 155MB/s ± 2% 153MB/s ± 1% -1.67% (p=0.000 n=91+89) puffs_flate_decode_10k/gcc 146MB/s ± 2% 147MB/s ± 0% +0.41% (p=0.000 n=86+83) puffs_flate_decode_100k/gcc 166MB/s ± 1% 170MB/s ± 0% +2.34% (p=0.000 n=88+84)
This commit is contained in:
1 parent
df8772dadf
commit
61c5b40bf6
2 files changed
+15
No files matched your search
@@ -1026,6 +1026,16 @@ puffs_flate_status puffs_flate_decoder_decode_huffman(
|
||||
uint8_t* t_7 = b_wptr_dst - t_6;
|
||||
uint32_t t_8 = (uint32_t)(self->private_impl.scratch);
|
||||
if (PUFFS_LIKELY((size_t)(t_8) <= (b_wend_dst - b_wptr_dst))) {
|
||||
for (; t_8 >= 8; t_8 -= 8) {
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
}
|
||||
for (; t_8; t_8--) {
|
||||
*b_wptr_dst++ = *t_7++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user