mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Remove LZW "cyclical prefix chain" internal error
name old speed new speed delta wuffs_gif_decode_1k_bw/clang 289MB/s ± 1% 309MB/s ± 0% +6.94% (p=0.000 n=50+5) wuffs_gif_decode_1k_color/clang 159MB/s ± 1% 160MB/s ± 0% ~ (p=0.080 n=48+5) wuffs_gif_decode_10k/clang 145MB/s ± 1% 145MB/s ± 0% ~ (p=0.371 n=49+5) wuffs_gif_decode_100k/clang 125MB/s ± 0% 131MB/s ± 1% +4.84% (p=0.000 n=46+5) wuffs_gif_decode_1000k/clang 128MB/s ± 1% 134MB/s ± 0% +5.22% (p=0.000 n=47+5) wuffs_gif_decode_1k_bw/gcc 341MB/s ± 1% 339MB/s ± 0% -0.48% (p=0.001 n=49+5) wuffs_gif_decode_1k_color/gcc 184MB/s ± 1% 186MB/s ± 0% +1.10% (p=0.000 n=50+5) wuffs_gif_decode_10k/gcc 162MB/s ± 0% 164MB/s ± 0% +1.76% (p=0.000 n=50+5) wuffs_gif_decode_100k/gcc 139MB/s ± 0% 143MB/s ± 0% +3.49% (p=0.000 n=49+5) wuffs_gif_decode_1000k/gcc 142MB/s ± 0% 146MB/s ± 0% +3.08% (p=0.000 n=49+5) wuffs_lzw_decode_20k/clang 132MB/s ± 0% 142MB/s ± 0% +7.91% (p=0.000 n=46+5) wuffs_lzw_decode_100k/clang 170MB/s ± 0% 186MB/s ± 1% +9.18% (p=0.000 n=46+5) wuffs_lzw_decode_20k/gcc 156MB/s ± 0% 162MB/s ± 0% +3.74% (p=0.000 n=47+5) wuffs_lzw_decode_100k/gcc 214MB/s ± 0% 235MB/s ± 1% +10.03% (p=0.000 n=47+5)
This commit is contained in:
1 parent
b0ab88c3bb
commit
cae1bfbc7d
2 files changed
+4
-13
No files matched your search
@@ -13,7 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
pub status "?bad code"
|
||||
pub status "?cyclical prefix chain"
|
||||
|
||||
pub struct decoder?(
|
||||
literal_width base.u32[..8],
|
||||
@@ -99,10 +98,9 @@ pub func decoder.decode!??(dst base.io_writer, src base.io_reader) {
|
||||
post c < 256 via "a < b: a < c; c <= b"(c:clear_code),
|
||||
{
|
||||
this.stack[s] = this.suffixes[c]
|
||||
if s == 0 {
|
||||
return status "?cyclical prefix chain"
|
||||
}
|
||||
s -= 1
|
||||
// The bitwise-and with 4095 is algorithmically a no-op, but is
|
||||
// necessary for the overflow checker.
|
||||
s = (s ~mod- 1) & 4095
|
||||
c = this.prefixes[c] as base.u32
|
||||
}
|
||||
this.stack[s] = c as base.u8
|
||||
|
||||
Reference in new issue
Block a user