Add wuffs_gif_decode_20k benchmark

That GIF image's LZW-compressed data is the same as that used for the
wuffs_lzw_decode_20k benchmark. Comparing the two speeds gives some
indication of the relative overhead of the framing format, as well as
decoding to a richer data structure (2D table instead of a 1D array,
potentially to BGRA instead of palette-index, amongst other things).

name                        speed
wuffs_gif_decode_20k/clang  246MB/s ± 1%
wuffs_gif_decode_20k/gcc    234MB/s ± 1%
wuffs_lzw_decode_20k/clang  272MB/s ± 0%
wuffs_lzw_decode_20k/gcc    269MB/s ± 0%
This commit is contained in:
Nigel Tao committed 2019-01-12 14:17:03 +11:00
1 parent 419d403257
commit c3a07db892
1 file changed
+16
+16
View File
@@ -1422,6 +1422,13 @@ const char* bench_wuffs_gif_decode_10k_indexed() {
100);
}
const char* bench_wuffs_gif_decode_20k() {
CHECK_FOCUS(__func__);
return do_bench_gif_decode(wuffs_gif_decode, "test/data/bricks-gray.gif",
WUFFS_BASE__PIXEL_FORMAT__INDEXED__BGRA_BINARY,
50);
}
const char* bench_wuffs_gif_decode_100k_artificial() {
CHECK_FOCUS(__func__);
return do_bench_gif_decode(
@@ -1474,6 +1481,13 @@ const char* bench_mimic_gif_decode_10k_indexed() {
100);
}
const char* bench_mimic_gif_decode_20k() {
CHECK_FOCUS(__func__);
return do_bench_gif_decode(mimic_gif_decode, "test/data/bricks-gray.gif",
WUFFS_BASE__PIXEL_FORMAT__INDEXED__BGRA_BINARY,
50);
}
const char* bench_mimic_gif_decode_100k_artificial() {
CHECK_FOCUS(__func__);
return do_bench_gif_decode(
@@ -1567,6 +1581,7 @@ proc benches[] = {
bench_wuffs_gif_decode_1k_color, //
bench_wuffs_gif_decode_10k_bgra, //
bench_wuffs_gif_decode_10k_indexed, //
bench_wuffs_gif_decode_20k, //
bench_wuffs_gif_decode_100k_artificial, //
bench_wuffs_gif_decode_100k_realistic, //
bench_wuffs_gif_decode_1000k, //
@@ -1577,6 +1592,7 @@ proc benches[] = {
bench_mimic_gif_decode_1k_bw, //
bench_mimic_gif_decode_1k_color, //
bench_mimic_gif_decode_10k_indexed, //
bench_mimic_gif_decode_20k, //
bench_mimic_gif_decode_100k_artificial, //
bench_mimic_gif_decode_100k_realistic, //
bench_mimic_gif_decode_1000k, //