std/lzma: use 8-byte-copy if applicable

name                            old speed      new speed      delta
wuffs_lzma_decode_100k/clang14  56.2MB/s ± 0%  60.7MB/s ± 0%  +7.96%  (p=0.008 n=5+5)
wuffs_lzma_decode_100k/gcc12    56.4MB/s ± 1%  61.7MB/s ± 1%  +9.44%  (p=0.008 n=5+5)

$ time example-mzcat < linux-6.8.2.tar.xz > /dev/null
Before: user 0m8.396s
After:  user 0m8.392s
This commit is contained in:
Nigel Tao committed 2024-03-31 16:02:06 +11:00
1 parent 7077c20cb6
commit b6b0f84187
7 files changed
+246 -27

No files matched your search

+16
View File
@@ -610,6 +610,14 @@ var funcsOther = [...]string{
// For now, that's all implicitly checked (i.e. hard coded).
"io_writer.limited_copy_u32_from_history_8_byte_chunks_fast!(up_to: u32, distance: u32) u32",
// TODO: this should have explicit pre-conditions:
// - up_to >= 1
// - (up_to + 8) <= this.length()
// - distance >= 8
// - distance <= this.history_length()
// For now, that's all implicitly checked (i.e. hard coded).
"io_writer.limited_copy_u32_from_history_8_byte_chunks_fast_return_cusp!(up_to: u32, distance: u32) u32[..= 0xFFFF]",
// TODO: this should have explicit pre-conditions:
// - up_to >= 1
// - (up_to + 8) <= this.length()
@@ -618,6 +626,14 @@ var funcsOther = [...]string{
// For now, that's all implicitly checked (i.e. hard coded).
"io_writer.limited_copy_u32_from_history_8_byte_chunks_distance_1_fast!(up_to: u32, distance: u32) u32",
// TODO: this should have explicit pre-conditions:
// - up_to >= 1
// - (up_to + 8) <= this.length()
// - distance == 1
// - distance <= this.history_length()
// For now, that's all implicitly checked (i.e. hard coded).
"io_writer.limited_copy_u32_from_history_8_byte_chunks_distance_1_fast_return_cusp!(up_to: u32, distance: u32) u32[..= 0xFFFF]",
// ---- token_writer
"token_writer.write_simple_token_fast!(" +