std/gif: remove the std/lzw dependency

name                                         old speed      new speed      delta

wuffs_gif_decode_1k_bw/clang11                683MB/s ± 0%   682MB/s ± 0%     ~     (p=0.690 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang11   168MB/s ± 0%   184MB/s ± 0%  +10.01%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang11   204MB/s ± 0%   230MB/s ± 0%  +12.77%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang11             746MB/s ± 0%   819MB/s ± 0%   +9.90%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang11          200MB/s ± 0%   218MB/s ± 0%   +8.97%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang11                  246MB/s ± 0%   257MB/s ± 0%   +4.33%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang11      543MB/s ± 0%   562MB/s ± 0%   +3.44%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/clang11       210MB/s ± 0%   220MB/s ± 0%   +4.90%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/clang11      214MB/s ± 0%   224MB/s ± 0%   +4.96%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/clang11      214MB/s ± 0%   224MB/s ± 0%   +4.98%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/clang11      1.24GB/s ± 0%  1.29GB/s ± 0%   +3.85%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/gcc10                  649MB/s ± 0%   588MB/s ± 0%   -9.42%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/gcc10     167MB/s ± 0%   198MB/s ± 0%  +18.57%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc10     195MB/s ± 0%   251MB/s ± 0%  +28.64%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc10               753MB/s ± 0%   871MB/s ± 0%  +15.64%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/gcc10            199MB/s ± 0%   233MB/s ± 0%  +16.86%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc10                    258MB/s ± 0%   265MB/s ± 0%   +2.93%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc10        560MB/s ± 0%   561MB/s ± 0%   +0.19%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/gcc10         221MB/s ± 0%   227MB/s ± 0%   +2.65%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/gcc10        227MB/s ± 0%   232MB/s ± 0%   +2.29%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc10        227MB/s ± 0%   232MB/s ± 0%   +2.28%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/gcc10        1.29GB/s ± 0%  1.28GB/s ± 0%   -0.22%  (p=0.008 n=5+5)
This commit is contained in:
Nigel Tao committed 2023-10-04 20:19:25 +11:00
1 parent 6f79c182ea
commit 8e42e01d3c
17 files changed
+600 -102

No files matched your search

+1 -22
View File
@@ -57,7 +57,6 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the
#define WUFFS_CONFIG__MODULES
#define WUFFS_CONFIG__MODULE__BASE
#define WUFFS_CONFIG__MODULE__GIF
#define WUFFS_CONFIG__MODULE__LZW
// If building this program in an environment that doesn't easily accommodate
// relative includes, you can use the script/inline-c-relative-includes.go
@@ -148,25 +147,6 @@ test_basic_status_is_error() {
return NULL;
}
const char* //
test_basic_sub_struct_initializer() {
CHECK_FOCUS(__func__);
wuffs_gif__decoder dec;
CHECK_STATUS("initialize",
wuffs_gif__decoder__initialize(
&dec, sizeof dec, WUFFS_VERSION,
WUFFS_INITIALIZE__LEAVE_INTERNAL_BUFFERS_UNINITIALIZED));
if (dec.private_impl.magic != WUFFS_BASE__MAGIC) {
RETURN_FAIL("outer magic: have %" PRIu32 ", want %" PRIu32 "",
dec.private_impl.magic, WUFFS_BASE__MAGIC);
}
if (dec.private_data.f_lzw.private_impl.magic != WUFFS_BASE__MAGIC) {
RETURN_FAIL("inner magic: have %" PRIu32 ", want %" PRIu32,
dec.private_data.f_lzw.private_impl.magic, WUFFS_BASE__MAGIC);
}
return NULL;
}
// ---------------- GIF Tests
const char* //
@@ -1637,7 +1617,7 @@ test_wuffs_gif_decode_pixel_data_too_much_sans_quirk() {
CHECK_STRING(read_file(
&src, "test/data/artificial-gif/pixel-data-too-much-bad-lzw.gif"));
CHECK_STRING(do_test_wuffs_gif_decode_expecting(
src, 0, wuffs_lzw__error__bad_code, false));
src, 0, wuffs_gif__error__bad_lzw_code, false));
src.meta = wuffs_base__empty_io_buffer_meta();
CHECK_STRING(read_file(
@@ -2351,7 +2331,6 @@ proc g_tests[] = {
test_basic_bad_wuffs_version,
test_basic_initialize_not_called,
test_basic_status_is_error,
test_basic_sub_struct_initializer,
test_wuffs_gif_call_interleaved,
test_wuffs_gif_call_sequence,