From d9c36922dbaff9082e173eae5a1e5ff247e7728e Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sun, 3 Feb 2019 15:32:40 +1100 Subject: [PATCH] Add comment on lzw.decoder.suffixes performance --- std/lzw/decode_lzw.wuffs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/std/lzw/decode_lzw.wuffs b/std/lzw/decode_lzw.wuffs index f7ec8986..038448a7 100644 --- a/std/lzw/decode_lzw.wuffs +++ b/std/lzw/decode_lzw.wuffs @@ -17,7 +17,13 @@ pub status "?bad code" pri status "?internal error: inconsistent I/O" // TODO: move bulk data buffers like decoder.suffixes or decoder.output into -// the workbuf? +// the workbuf? The first attempt at this was a performance regression for +// decoding all but the smallest GIFs. See these git commits for numbers: +// - 49627b4 Flatten the lzw.decoder.suffixes array +// - f877fb2 Use the workbuf instead of lzw.decoder.suffixes +// - 85be5b9 Delete the obsolete lzw.decoder.suffixes array +// and the roll back has combined numbers: +// - 3056a84 Roll back 3 recent lzw.decoder.suffixes commits pub const decoder_workbuf_len_max_incl base.u64 = 0 pub struct decoder?(