Commit Graph
1070 Commits
Author SHA1 Message Date
Nigel Tao 9af2666aec Move std/png first_frame_io_position earlier 2021-11-10 16:52:59 +11:00
Nigel Tao 9c3d27fb43 Fix std/png decode_other_chunk skipping chunks 2021-11-09 22:10:00 +11:00
Nigel Tao 2373340f83 Add base.ANIMATION_DISPOSAL__ETC constants 2021-11-09 09:53:29 +11:00
Nigel Tao e847766b02 Tweak std/png decode_other_chunk if-else chain 2021-11-09 09:05:11 +11:00
Nigel Tao 74c1dfce96 Rename std/gif num_loops field 2021-11-09 08:55:15 +11:00
Nigel Tao ca76a01ac2 Have std/png support remapped transparency 2021-11-07 09:51:04 +11:00
Nigel Tao 00b329872a Tighten png.INTERLACING type refinement 2021-11-06 09:54:56 +11:00
Nigel Tao 744fbdd732 Have std/png decode iCCP chunks
Updates #39
2021-11-05 16:29:11 +11:00
Nigel Tao 8f9a4f40c2 Rename METADATA_RAW as METADATA_RAW_PASSTHROUGH 2021-10-31 15:17:46 +11:00
Nigel Tao db5a407bab Have std/png decode sRGB chunks
Updates #39
2021-10-16 09:27:30 +11:00
Nigel Tao 911049e9f9 Have std/png decode cHRM and gAMA chunks
Updates #39
2021-10-15 15:08:47 +11:00
Nigel Tao d8ad363ef5 Tweak png.decoder.decode_image_config indentation 2021-10-15 13:35:15 +11:00
Nigel Tao ad1d983698 Add ETC__MORE_INFORMATION__FLAVOR__METADATA_PARSED 2021-10-14 17:17:11 +11:00
Nigel Tao f9c029c788 Fix std/png history_position for interlacing 2021-10-07 13:52:40 +11:00
Nigel Tao 592bc14ed1 Have std/deflate allow non-compact dst history
Fixes #52

On a mid-range x86_64 laptop (2016, Skylake):

name                                                      old speed      new speed      delta

wuffs_deflate_decode_1k_full_init/clang9                   101MB/s ± 1%   100MB/s ± 1%   -1.22%  (p=0.000 n=9+9)
wuffs_deflate_decode_1k_part_init/clang9                   119MB/s ± 1%   119MB/s ± 1%     ~     (p=0.139 n=8+9)
wuffs_deflate_decode_10k_full_init/clang9                  221MB/s ± 1%   210MB/s ± 1%   -4.94%  (p=0.000 n=9+9)
wuffs_deflate_decode_10k_part_init/clang9                  225MB/s ± 3%   215MB/s ± 1%   -4.33%  (p=0.000 n=10+8)
wuffs_deflate_decode_100k_just_one_read/clang9             290MB/s ± 0%   284MB/s ± 1%   -2.26%  (p=0.000 n=8+9)
wuffs_deflate_decode_100k_many_big_reads/clang9            188MB/s ± 3%   177MB/s ± 1%   -5.78%  (p=0.000 n=9+10)

wuffs_deflate_decode_1k_full_init/gcc10                    101MB/s ± 0%    97MB/s ± 1%   -3.65%  (p=0.000 n=8+9)
wuffs_deflate_decode_1k_part_init/gcc10                    119MB/s ± 1%   113MB/s ± 2%   -4.65%  (p=0.000 n=9+9)
wuffs_deflate_decode_10k_full_init/gcc10                   214MB/s ± 3%   224MB/s ± 1%   +4.83%  (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc10                   222MB/s ± 1%   231MB/s ± 1%   +4.03%  (p=0.000 n=9+10)
wuffs_deflate_decode_100k_just_one_read/gcc10              281MB/s ± 2%   297MB/s ± 0%   +5.78%  (p=0.000 n=9+9)
wuffs_deflate_decode_100k_many_big_reads/gcc10             184MB/s ± 0%   194MB/s ± 0%   +5.85%  (p=0.000 n=10+8)

mimic_deflate_decode_1k_full_init                          138MB/s ± 1%   138MB/s ± 0%     ~     (p=0.546 n=9+9)
mimic_deflate_decode_10k_full_init                         156MB/s ± 2%   156MB/s ± 0%     ~     (p=0.387 n=9+9)
mimic_deflate_decode_100k_just_one_read                    191MB/s ± 1%   190MB/s ± 2%   -0.94%  (p=0.004 n=9+10)
mimic_deflate_decode_100k_many_big_reads                   147MB/s ± 1%   147MB/s ± 1%     ~     (p=0.356 n=9+10)

wuffs_gzip_decode_10k/clang9                               220MB/s ± 1%   209MB/s ± 1%   -5.29%  (p=0.000 n=10+9)
wuffs_gzip_decode_100k/clang9                              283MB/s ± 2%   279MB/s ± 1%   -1.47%  (p=0.002 n=10+10)

wuffs_gzip_decode_10k/gcc10                                218MB/s ± 1%   214MB/s ± 2%   -1.76%  (p=0.000 n=9+10)
wuffs_gzip_decode_100k/gcc10                               274MB/s ± 0%   264MB/s ± 2%   -3.61%  (p=0.000 n=7+10)

mimic_gzip_decode_10k                                      131MB/s ± 2%   132MB/s ± 0%   +0.81%  (p=0.000 n=10+8)
mimic_gzip_decode_100k                                     156MB/s ± 0%   156MB/s ± 1%     ~     (p=0.423 n=8+9)

wuffs_zlib_decode_10k/clang9                               223MB/s ± 2%   209MB/s ± 2%   -6.41%  (p=0.000 n=10+10)
wuffs_zlib_decode_100k/clang9                              285MB/s ± 0%   280MB/s ± 0%   -1.87%  (p=0.000 n=8+9)

wuffs_zlib_decode_10k/gcc10                                235MB/s ± 0%   215MB/s ± 1%   -8.22%  (p=0.000 n=10+9)
wuffs_zlib_decode_100k/gcc10                               293MB/s ± 0%   268MB/s ± 1%   -8.38%  (p=0.000 n=8+10)

mimic_zlib_decode_10k                                      145MB/s ± 1%   145MB/s ± 1%   -0.45%  (p=0.004 n=9+9)
mimic_zlib_decode_100k                                     175MB/s ± 1%   174MB/s ± 0%     ~     (p=0.055 n=10+8)

wuffs_png_decode_image_19k_8bpp/clang9                     142MB/s ± 1%   152MB/s ± 1%   +6.98%  (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/clang9                    172MB/s ± 0%   170MB/s ± 0%   -1.63%  (p=0.000 n=8+9)
wuffs_png_decode_image_77k_8bpp/clang9                     504MB/s ± 2%   540MB/s ± 1%   +7.28%  (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   462MB/s ± 1%   470MB/s ± 0%   +1.57%  (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   445MB/s ± 1%   451MB/s ± 0%   +1.49%  (p=0.000 n=8+10)
wuffs_png_decode_image_4002k_24bpp/clang9                  175MB/s ± 3%   175MB/s ± 1%     ~     (p=0.356 n=9+10)

wuffs_png_decode_image_19k_8bpp/gcc10                      150MB/s ± 0%   153MB/s ± 1%   +2.03%  (p=0.000 n=10+10)
wuffs_png_decode_image_40k_24bpp/gcc10                     186MB/s ± 0%   186MB/s ± 0%     ~     (p=0.408 n=10+8)
wuffs_png_decode_image_77k_8bpp/gcc10                      543MB/s ± 0%   542MB/s ± 0%   -0.23%  (p=0.019 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    478MB/s ± 1%   498MB/s ± 0%   +4.12%  (p=0.000 n=10+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    451MB/s ± 4%   476MB/s ± 0%   +5.37%  (p=0.000 n=10+9)
wuffs_png_decode_image_4002k_24bpp/gcc10                   185MB/s ± 2%   190MB/s ± 1%   +2.78%  (p=0.000 n=10+9)

mimic_png_decode_image_19k_8bpp                           63.0MB/s ± 0%  62.9MB/s ± 1%     ~     (p=0.673 n=8+9)
mimic_png_decode_image_40k_24bpp                          78.7MB/s ± 0%  78.9MB/s ± 0%     ~     (p=0.059 n=9+8)
mimic_png_decode_image_77k_8bpp                            192MB/s ± 1%   193MB/s ± 3%   +0.44%  (p=0.028 n=10+9)
mimic_png_decode_image_552k_32bpp_verify_checksum          157MB/s ± 0%   158MB/s ± 1%     ~     (p=0.053 n=10+9)
mimic_png_decode_image_4002k_24bpp                         113MB/s ± 1%   113MB/s ± 1%     ~     (p=0.053 n=10+9)
2021-08-15 10:50:41 +10:00
Nigel Tao 28a54baa19 Add io_bind history_position arg 2021-08-15 08:36:14 +10:00
Nigel Tao 77f855206d Have JSON line-comment tokens exclude the "\n"
Before this commit, line-comment token chains included the final "\n"
the way block-comments included the final "*/". The "\n" was mandatory.

However, when parsing with both QUIRK_ALLOW_COMMENT_LINE and
QUIRK_ALLOW_TRAILING_FILLER, input like "123//xyz" (without a "\n"
before the EOF) was rejected before and accepted after this commit.

So that line-comments are consistent, in that they either always or
never include the final "\n", they now never include the final "\n".

An input fragment (parsed with QUIRK_ALLOW_COMMENT_LINE) like
"//abc\n\t\t" was, before this commit, parsed as a 6 byte comment token
and a 2 byte other-filler token. That split is now 5+3.
2021-07-20 14:17:09 +10:00
Nigel Tao 3358730f6f Have std/png reject zero width or height 2021-05-11 12:34:19 +10:00
Nigel Tao e77d73e3ce Add std/adler32 bench comment for the roll back 2021-04-28 22:38:10 +10:00
Nigel Tao 0a6cce5e0e Tweak some adler32 hasher.up_x86_sse42 var names 2021-04-28 00:32:32 +10:00
Nigel Tao abd37fa3f8 Roll back 'Add std/adler32 hasher.up_x86_avx2'
See the previous commit for the rationale.
2021-04-28 00:26:54 +10:00
Nigel Tao baec831fc8 Add std/adler32 hasher.up_x86_avx2
While the std/adler32 benchmarks got better, the std/zlib and std/png
benchmarks got worse.

This commit will soon be followed by a rollback, but it is committed
anyway so that we can refer to these numbers in the git log.

Binary size, before:
4056 gen/lib/c/clang-9-dynamic/wuffs-std-adler32.lo
4104 gen/lib/c/clang-9-static/wuffs-std-adler32.o
4624 gen/lib/c/gcc-dynamic/wuffs-std-adler32.lo
4680 gen/lib/c/gcc-static/wuffs-std-adler32.o

After:
4952 gen/lib/c/clang-9-dynamic/wuffs-std-adler32.lo
5016 gen/lib/c/clang-9-static/wuffs-std-adler32.o
5512 gen/lib/c/gcc-dynamic/wuffs-std-adler32.lo
5576 gen/lib/c/gcc-static/wuffs-std-adler32.o

name                                                      old speed      new speed      delta

wuffs_adler32_10k/clang9                                  11.5GB/s ± 1%  15.0GB/s ± 5%  +30.73%  (p=0.000 n=9+10)
wuffs_adler32_100k/clang9                                 13.5GB/s ± 1%  15.6GB/s ±14%  +16.06%  (p=0.001 n=9+10)

wuffs_adler32_10k/gcc10                                   11.3GB/s ± 2%  15.6GB/s ± 1%  +38.27%  (p=0.000 n=9+9)
wuffs_adler32_100k/gcc10                                  11.3GB/s ± 1%  19.4GB/s ± 1%  +71.20%  (p=0.000 n=7+9)

wuffs_zlib_decode_10k/clang9                               223MB/s ± 1%   216MB/s ± 2%   -3.45%  (p=0.000 n=10+10)
wuffs_zlib_decode_100k/clang9                              285MB/s ± 1%   284MB/s ± 1%     ~     (p=0.243 n=9+10)

wuffs_zlib_decode_10k/gcc10                                232MB/s ± 1%   216MB/s ± 1%   -6.70%  (p=0.000 n=10+9)
wuffs_zlib_decode_100k/gcc10                               291MB/s ± 1%   280MB/s ± 1%   -3.70%  (p=0.000 n=9+8)

wuffs_png_decode_image_19k_8bpp/clang9                     152MB/s ± 1%   143MB/s ± 3%   -5.89%  (p=0.000 n=8+9)
wuffs_png_decode_image_40k_24bpp/clang9                    171MB/s ± 1%   173MB/s ± 1%     ~     (p=0.094 n=9+9)
wuffs_png_decode_image_77k_8bpp/clang9                     541MB/s ± 1%   509MB/s ± 1%   -5.77%  (p=0.000 n=8+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   479MB/s ± 1%   464MB/s ± 3%   -3.20%  (p=0.000 n=8+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   461MB/s ± 1%   452MB/s ± 1%   -2.02%  (p=0.000 n=8+10)
wuffs_png_decode_image_4002k_24bpp/clang9                  177MB/s ± 1%   175MB/s ± 2%   -1.14%  (p=0.004 n=10+10)

wuffs_png_decode_image_19k_8bpp/gcc10                      159MB/s ± 1%   153MB/s ± 1%   -3.54%  (p=0.000 n=8+10)
wuffs_png_decode_image_40k_24bpp/gcc10                     188MB/s ± 1%   187MB/s ± 1%   -0.47%  (p=0.021 n=10+9)
wuffs_png_decode_image_77k_8bpp/gcc10                      557MB/s ± 0%   546MB/s ± 4%   -1.94%  (p=0.000 n=8+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    510MB/s ± 0%   493MB/s ± 0%   -3.33%  (p=0.000 n=10+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    486MB/s ± 1%   478MB/s ± 0%   -1.77%  (p=0.000 n=8+9)
wuffs_png_decode_image_4002k_24bpp/gcc10                   189MB/s ± 1%   187MB/s ± 1%   -1.26%  (p=0.000 n=10+10)
2021-04-28 00:18:20 +10:00
Nigel Tao 5764f77913 Have std/png produce PIXEL_FORMAT__Y_16LE
Updates #46
2021-04-16 14:34:48 +10:00
Nigel Tao 2dddd388bc Add crc32.ieee_hasher.up_x86_avx2
name                                                      old speed      new speed      delta

wuffs_crc32_ieee_10k/clang9                               8.42GB/s ± 1%  8.12GB/s ± 1%   -3.55%  (p=0.000 n=9+8)
wuffs_crc32_ieee_100k/clang9                              11.0GB/s ± 1%  10.9GB/s ± 1%     ~     (p=0.931 n=9+9)

wuffs_crc32_ieee_10k/gcc10                                9.20GB/s ± 0%  9.71GB/s ± 0%   +5.54%  (p=0.000 n=8+10)
wuffs_crc32_ieee_100k/gcc10                               11.9GB/s ± 2%  13.1GB/s ± 1%  +10.22%  (p=0.000 n=10+8)

wuffs_gzip_decode_10k/clang9                               219MB/s ± 1%   218MB/s ± 2%     ~     (p=0.497 n=9+10)
wuffs_gzip_decode_100k/clang9                              283MB/s ± 2%   281MB/s ± 1%     ~     (p=0.063 n=10+10)

wuffs_gzip_decode_10k/gcc10                                224MB/s ± 1%   223MB/s ± 1%     ~     (p=0.489 n=9+9)
wuffs_gzip_decode_100k/gcc10                               285MB/s ± 4%   290MB/s ± 0%   +1.68%  (p=0.004 n=10+8)

wuffs_png_decode_image_19k_8bpp/clang9                     138MB/s ± 2%   138MB/s ± 1%     ~     (p=0.156 n=10+9)
wuffs_png_decode_image_40k_24bpp/clang9                    171MB/s ± 2%   172MB/s ± 1%     ~     (p=0.971 n=10+10)
wuffs_png_decode_image_77k_8bpp/clang9                     495MB/s ± 4%   504MB/s ± 1%   +1.79%  (p=0.000 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   457MB/s ± 4%   463MB/s ± 0%   +1.35%  (p=0.002 n=9+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   435MB/s ± 5%   445MB/s ± 1%   +2.31%  (p=0.000 n=10+9)
wuffs_png_decode_image_4002k_24bpp/clang9                  172MB/s ± 2%   174MB/s ± 1%     ~     (p=0.053 n=10+9)

wuffs_png_decode_image_19k_8bpp/gcc10                      157MB/s ± 1%   157MB/s ± 1%     ~     (p=0.549 n=9+10)
wuffs_png_decode_image_40k_24bpp/gcc10                     187MB/s ± 1%   186MB/s ± 1%     ~     (p=0.182 n=10+9)
wuffs_png_decode_image_77k_8bpp/gcc10                      554MB/s ± 1%   559MB/s ± 0%   +0.84%  (p=0.000 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    502MB/s ± 1%   500MB/s ± 0%   -0.38%  (p=0.011 n=10+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    481MB/s ± 1%   478MB/s ± 0%   -0.46%  (p=0.002 n=8+9)
wuffs_png_decode_image_4002k_24bpp/gcc10                   189MB/s ± 2%   190MB/s ± 0%   +0.62%  (p=0.008 n=10+9)
2021-04-09 23:12:32 +10:00
Nigel Tao 1dd7ad4413 Optimize std/deflate decoding for RLE sections
name                                                      old speed      new speed      delta

wuffs_deflate_decode_1k_full_init/clang9                   104MB/s ± 1%   104MB/s ± 1%     ~     (p=0.161 n=9+9)
wuffs_deflate_decode_1k_part_init/clang9                   121MB/s ± 1%   119MB/s ± 1%   -0.92%  (p=0.000 n=9+9)
wuffs_deflate_decode_10k_full_init/clang9                  223MB/s ± 1%   223MB/s ± 1%     ~     (p=0.796 n=9+9)
wuffs_deflate_decode_10k_part_init/clang9                  230MB/s ± 1%   228MB/s ± 2%     ~     (p=0.065 n=10+9)
wuffs_deflate_decode_100k_just_one_read/clang9             279MB/s ± 1%   292MB/s ± 0%   +4.78%  (p=0.000 n=9+8)
wuffs_deflate_decode_100k_many_big_reads/clang9            178MB/s ± 5%   189MB/s ± 2%   +6.41%  (p=0.000 n=10+10)

wuffs_deflate_decode_1k_full_init/gcc10                    103MB/s ± 1%   102MB/s ± 1%   -0.57%  (p=0.022 n=10+9)
wuffs_deflate_decode_1k_part_init/gcc10                    122MB/s ± 1%   121MB/s ± 3%   -1.46%  (p=0.000 n=10+9)
wuffs_deflate_decode_10k_full_init/gcc10                   235MB/s ± 1%   231MB/s ± 1%   -1.34%  (p=0.000 n=10+8)
wuffs_deflate_decode_10k_part_init/gcc10                   242MB/s ± 1%   239MB/s ± 0%   -1.40%  (p=0.001 n=9+8)
wuffs_deflate_decode_100k_just_one_read/gcc10              300MB/s ± 4%   297MB/s ± 2%     ~     (p=0.156 n=10+9)
wuffs_deflate_decode_100k_many_big_reads/gcc10             193MB/s ± 2%   197MB/s ± 1%   +2.29%  (p=0.000 n=10+9)

wuffs_gzip_decode_10k/clang9                               220MB/s ± 1%   219MB/s ± 1%     ~     (p=0.605 n=9+9)
wuffs_gzip_decode_100k/clang9                              269MB/s ± 2%   283MB/s ± 2%   +4.98%  (p=0.000 n=9+10)

wuffs_gzip_decode_10k/gcc10                                227MB/s ± 1%   224MB/s ± 1%   -1.42%  (p=0.000 n=10+9)
wuffs_gzip_decode_100k/gcc10                               283MB/s ± 1%   285MB/s ± 4%     ~     (p=0.182 n=9+10)

wuffs_zlib_decode_10k/clang9                               226MB/s ± 1%   220MB/s ± 4%   -2.66%  (p=0.000 n=9+10)
wuffs_zlib_decode_100k/clang9                              272MB/s ± 2%   285MB/s ± 1%   +4.77%  (p=0.000 n=10+8)

wuffs_zlib_decode_10k/gcc10                                227MB/s ± 1%   212MB/s ± 1%   -6.80%  (p=0.000 n=10+9)
wuffs_zlib_decode_100k/gcc10                               282MB/s ± 1%   273MB/s ± 0%   -3.32%  (p=0.000 n=9+8)

wuffs_png_decode_image_19k_8bpp/clang9                     148MB/s ± 1%   138MB/s ± 2%   -6.79%  (p=0.000 n=9+10)
wuffs_png_decode_image_40k_24bpp/clang9                    170MB/s ± 1%   171MB/s ± 2%     ~     (p=0.133 n=9+10)
wuffs_png_decode_image_77k_8bpp/clang9                     525MB/s ± 1%   495MB/s ± 4%   -5.81%  (p=0.000 n=8+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   400MB/s ± 2%   457MB/s ± 4%  +14.16%  (p=0.000 n=9+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   388MB/s ± 1%   435MB/s ± 5%  +12.17%  (p=0.000 n=9+10)
wuffs_png_decode_image_4002k_24bpp/clang9                  175MB/s ± 1%   172MB/s ± 2%   -1.78%  (p=0.005 n=10+10)

wuffs_png_decode_image_19k_8bpp/gcc10                      154MB/s ± 3%   157MB/s ± 1%   +1.72%  (p=0.001 n=9+9)
wuffs_png_decode_image_40k_24bpp/gcc10                     182MB/s ± 1%   187MB/s ± 1%   +2.56%  (p=0.000 n=9+10)
wuffs_png_decode_image_77k_8bpp/gcc10                      552MB/s ± 3%   554MB/s ± 1%     ~     (p=0.863 n=9+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    426MB/s ± 2%   502MB/s ± 1%  +17.85%  (p=0.000 n=10+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    410MB/s ± 2%   481MB/s ± 1%  +17.17%  (p=0.000 n=9+8)
wuffs_png_decode_image_4002k_24bpp/gcc10                   186MB/s ± 1%   189MB/s ± 2%   +1.33%  (p=0.001 n=9+10)
2021-04-09 14:31:52 +10:00
Nigel Tao a7ef82f7db Add deflate.decoder.decode_huffman_bmi2
Binary size, before:
21864 gen/lib/c/clang-9-dynamic/wuffs-std-deflate.lo
21488 gen/lib/c/clang-9-static/wuffs-std-deflate.o
21136 gen/lib/c/gcc-dynamic/wuffs-std-deflate.lo
21536 gen/lib/c/gcc-static/wuffs-std-deflate.o

After:
24592 gen/lib/c/clang-9-dynamic/wuffs-std-deflate.lo
24368 gen/lib/c/clang-9-static/wuffs-std-deflate.o
23320 gen/lib/c/gcc-dynamic/wuffs-std-deflate.lo
23928 gen/lib/c/gcc-static/wuffs-std-deflate.o

I've upgraded my kernel and compilers recently, so the absolute Wuffs
benchmark numbers below aren't directly comparable to those reported in
previous commits, but the relative changes still seems valid.

On a mid-range x86_64 laptop:

name                                                      old speed      new speed      delta

wuffs_deflate_decode_1k_full_init/clang9                   107MB/s ± 1%   104MB/s ± 1%   -2.36%  (p=0.000 n=8+9)
wuffs_deflate_decode_1k_part_init/clang9                   123MB/s ± 1%   121MB/s ± 1%   -1.78%  (p=0.000 n=10+9)
wuffs_deflate_decode_10k_full_init/clang9                  221MB/s ± 2%   223MB/s ± 1%   +0.86%  (p=0.035 n=10+9)
wuffs_deflate_decode_10k_part_init/clang9                  228MB/s ± 0%   230MB/s ± 1%   +0.59%  (p=0.003 n=8+10)
wuffs_deflate_decode_100k_just_one_read/clang9             276MB/s ± 0%   279MB/s ± 1%   +1.12%  (p=0.001 n=8+9)
wuffs_deflate_decode_100k_many_big_reads/clang9            174MB/s ± 1%   178MB/s ± 5%   +2.38%  (p=0.028 n=9+10)

wuffs_deflate_decode_1k_full_init/gcc10                    103MB/s ± 3%   103MB/s ± 1%     ~     (p=0.105 n=10+10)
wuffs_deflate_decode_1k_part_init/gcc10                    123MB/s ± 1%   122MB/s ± 1%   -0.94%  (p=0.001 n=9+10)
wuffs_deflate_decode_10k_full_init/gcc10                   216MB/s ± 2%   235MB/s ± 1%   +8.83%  (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc10                   223MB/s ± 1%   242MB/s ± 1%   +8.45%  (p=0.000 n=9+9)
wuffs_deflate_decode_100k_just_one_read/gcc10              270MB/s ± 4%   300MB/s ± 4%  +11.08%  (p=0.000 n=9+10)
wuffs_deflate_decode_100k_many_big_reads/gcc10             179MB/s ± 1%   193MB/s ± 2%   +7.97%  (p=0.000 n=10+10)

wuffs_gzip_decode_10k/clang9                               218MB/s ± 3%   220MB/s ± 1%     ~     (p=0.549 n=10+9)
wuffs_gzip_decode_100k/clang9                              270MB/s ± 0%   269MB/s ± 2%     ~     (p=0.730 n=9+9)

wuffs_gzip_decode_10k/gcc10                                208MB/s ± 1%   227MB/s ± 1%   +8.87%  (p=0.000 n=9+10)
wuffs_gzip_decode_100k/gcc10                               267MB/s ± 1%   283MB/s ± 1%   +6.05%  (p=0.000 n=10+9)

wuffs_zlib_decode_10k/clang9                               214MB/s ± 2%   226MB/s ± 1%   +5.69%  (p=0.000 n=10+9)
wuffs_zlib_decode_100k/clang9                              259MB/s ± 6%   272MB/s ± 2%   +5.05%  (p=0.000 n=9+10)

wuffs_zlib_decode_10k/gcc10                                211MB/s ± 1%   227MB/s ± 1%   +7.53%  (p=0.000 n=10+10)
wuffs_zlib_decode_100k/gcc10                               262MB/s ± 1%   282MB/s ± 1%   +7.69%  (p=0.000 n=10+9)

wuffs_png_decode_image_19k_8bpp/clang9                     144MB/s ± 0%   148MB/s ± 1%   +2.68%  (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/clang9                    166MB/s ± 1%   170MB/s ± 1%   +2.38%  (p=0.000 n=9+9)
wuffs_png_decode_image_77k_8bpp/clang9                     515MB/s ± 1%   525MB/s ± 1%   +1.91%  (p=0.000 n=9+8)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   401MB/s ± 1%   400MB/s ± 2%     ~     (p=0.913 n=9+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   387MB/s ± 1%   388MB/s ± 1%     ~     (p=0.546 n=9+9)
wuffs_png_decode_image_4002k_24bpp/clang9                  170MB/s ± 3%   175MB/s ± 1%   +3.02%  (p=0.000 n=9+10)

wuffs_png_decode_image_19k_8bpp/gcc10                      143MB/s ± 2%   154MB/s ± 3%   +8.32%  (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/gcc10                     174MB/s ± 2%   182MB/s ± 1%   +4.42%  (p=0.000 n=10+9)
wuffs_png_decode_image_77k_8bpp/gcc10                      513MB/s ± 2%   552MB/s ± 3%   +7.66%  (p=0.000 n=10+9)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    408MB/s ± 1%   426MB/s ± 2%   +4.43%  (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    390MB/s ± 4%   410MB/s ± 2%   +5.05%  (p=0.000 n=10+9)
wuffs_png_decode_image_4002k_24bpp/gcc10                   177MB/s ± 1%   186MB/s ± 1%   +5.13%  (p=0.000 n=9+9)
2021-04-09 00:06:33 +10:00
Nigel Tao 9b228fab2a Make deflate.decoder.decode_huffman_fast64 choosy 2021-04-09 00:06:32 +10:00
Nigel Tao b24e046670 Replace SIMD CRC-32 k6' magic constant with Px'
This is just a change of name (and a change of comment), not a change of
value.

From my colleague, Eric Biggers:

The number is not k6' = (x^32 mod P(x) << 32)' << 1 = 0x1DB710640, but
rather P(x)' = 0x1DB710641. This value represents the generator
polynomial of CRC-32 as a 33-bit value, using the CRC-32 bit ordering
convention (lowest order bit = coefficient of highest order polynomial
term). The lowest order bit is the coefficient of x^32, which by
definition is 1 for CRC-32. P(x) is used as a multiplicand in Barrett
reduction, which is the step which reduces a 64-bit value to the final
32-bit remainder. See "Algorithm 1" in the Gopal paper.

The reason that last bit doesn't actually matter is because the output
of the Barrett reduction is supposed to be fully reduced mod P(x), so
only 32 bits (the bits that represent the coefficients of x^0..x^31) are
supposed to be able to be nonzero. Therefore, in practice
implementations will just truncate the result to 32 bits. Incorrectly
using 0x1DB710640 rather than P(x) = 0x1DB710641 only causes the result
to be wrong by a factor of x^32, so it doesn't affect those 32 bits.
2021-03-18 11:21:51 +11:00
Nigel Tao 16b4b7554b Link to SIMD CRC-32 k6' magic constant blog post 2021-03-18 11:06:21 +11:00
Nigel Tao 385c34930a Check 8-byte-chunk copy distance precondition 2021-03-11 22:54:06 +11:00
Nigel Tao 4e3a005d28 Use 8-byte-chunk copy for decode_huffman_fast32
On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_deflate_decode_1k_full_init/clang9                  45.1MB/s ± 5%   47.2MB/s ± 6%     ~     (p=0.151 n=5+5)
wuffs_deflate_decode_1k_part_init/clang9                  60.6MB/s ± 0%   64.2MB/s ± 0%   +5.94%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_full_init/clang9                 82.0MB/s ± 1%  104.8MB/s ± 1%  +27.75%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_part_init/clang9                 87.9MB/s ± 0%  114.4MB/s ± 0%  +30.13%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/clang9             111MB/s ± 0%    139MB/s ± 0%  +26.03%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/clang9           60.2MB/s ± 0%   63.3MB/s ± 0%   +5.28%  (p=0.008 n=5+5)

wuffs_deflate_decode_1k_full_init/gcc8                    45.8MB/s ± 3%   47.4MB/s ± 1%   +3.38%  (p=0.032 n=5+5)
wuffs_deflate_decode_1k_part_init/gcc8                    63.0MB/s ± 1%   62.8MB/s ± 1%     ~     (p=0.151 n=5+5)
wuffs_deflate_decode_10k_full_init/gcc8                   87.9MB/s ± 0%  102.9MB/s ± 1%  +17.08%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_part_init/gcc8                   95.3MB/s ± 0%  111.5MB/s ± 0%  +17.03%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/gcc8               115MB/s ± 0%    130MB/s ± 0%  +12.38%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/gcc8             58.9MB/s ± 0%   60.1MB/s ± 0%   +1.94%  (p=0.008 n=5+5)

mimic_deflate_decode_1k                                   77.7MB/s ± 1%   77.2MB/s ± 1%     ~     (p=0.222 n=5+5)
mimic_deflate_decode_10k                                   114MB/s ± 0%    114MB/s ± 1%     ~     (p=0.548 n=5+5)
mimic_deflate_decode_100k_just_one_read                    158MB/s ± 0%    158MB/s ± 0%     ~     (p=0.056 n=5+5)
mimic_deflate_decode_100k_many_big_reads                   113MB/s ± 0%    113MB/s ± 0%     ~     (p=0.690 n=5+5)

----

wuffs_gzip_decode_10k/clang9                              91.4MB/s ± 0%  106.9MB/s ± 0%  +16.93%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/clang9                              113MB/s ± 0%    128MB/s ± 0%  +13.01%  (p=0.008 n=5+5)

wuffs_gzip_decode_10k/gcc8                                92.2MB/s ± 0%  109.7MB/s ± 0%  +19.00%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/gcc8                                111MB/s ± 0%    119MB/s ± 0%   +7.43%  (p=0.008 n=5+5)

mimic_gzip_decode_10k                                     98.2MB/s ± 0%   98.1MB/s ± 0%     ~     (p=0.222 n=5+5)
mimic_gzip_decode_100k                                     128MB/s ± 0%    128MB/s ± 0%   +0.11%  (p=0.008 n=5+5)

----

wuffs_zlib_decode_10k/clang9                              90.8MB/s ± 0%  111.5MB/s ± 0%  +22.86%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/clang9                              108MB/s ± 0%    134MB/s ± 0%  +23.90%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/gcc8                                92.3MB/s ± 0%  108.2MB/s ± 0%  +17.15%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/gcc8                                112MB/s ± 0%    119MB/s ± 0%   +6.90%  (p=0.008 n=5+5)

mimic_zlib_decode_10k                                      108MB/s ± 0%    108MB/s ± 0%   +0.39%  (p=0.008 n=5+5)
mimic_zlib_decode_100k                                     143MB/s ± 0%    141MB/s ± 0%   -1.28%  (p=0.008 n=5+5)

----

wuffs_png_decode_image_19k_8bpp/clang9                    72.4MB/s ± 0%   81.9MB/s ± 0%  +13.10%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9                    104MB/s ± 0%    104MB/s ± 0%   -0.40%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     274MB/s ± 0%    301MB/s ± 0%   +9.80%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   165MB/s ± 0%    183MB/s ± 0%  +10.96%  (p=0.016 n=4+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   160MB/s ± 1%    178MB/s ± 0%  +11.28%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                 98.1MB/s ± 0%   98.9MB/s ± 0%   +0.82%  (p=0.016 n=5+4)

wuffs_png_decode_image_19k_8bpp/gcc8                      73.5MB/s ± 0%   80.4MB/s ± 0%   +9.33%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc8                      104MB/s ± 0%    106MB/s ± 0%   +1.73%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc8                       248MB/s ± 0%    272MB/s ± 0%   +9.67%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc8     163MB/s ± 0%    177MB/s ± 0%   +8.89%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc8     157MB/s ± 0%    170MB/s ± 0%   +8.42%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc8                   98.6MB/s ± 0%  100.9MB/s ± 0%   +2.29%  (p=0.008 n=5+5)

mimic_png_decode_image_19k_8bpp                           43.7MB/s ± 0%   43.7MB/s ± 0%     ~     (p=0.690 n=5+5)
mimic_png_decode_image_40k_24bpp                          54.6MB/s ± 0%   54.6MB/s ± 0%     ~     (p=0.151 n=5+5)
mimic_png_decode_image_77k_8bpp                            125MB/s ± 0%    124MB/s ± 0%   -0.28%  (p=0.008 n=5+5)
mimic_png_decode_image_552k_32bpp_ignore_checksum               skipped
mimic_png_decode_image_552k_32bpp_verify_checksum          102MB/s ± 0%    102MB/s ± 0%     ~     (p=0.238 n=5+5)
mimic_png_decode_image_4002k_24bpp                        81.7MB/s ± 0%   81.8MB/s ± 0%   +0.09%  (p=0.008 n=5+5)
2021-03-08 15:41:48 +11:00
Nigel Tao b58a961acb Add etc_copy_u32_from_history_8_byte_chunks_fast
On a mid-range x86_64 laptop:

----

$ ls -lh linux-5.11.3.tar.gz | awk '{print $5 " " $9}'
178M linux-5.11.3.tar.gz

$ # Debian's /usr/bin/zcat
$ time /usr/bin/zcat        < linux-5.11.3.tar.gz > /dev/null
real	0m8.423s

$ # Wuffs; before
$ time gen/bin/example-zcat < linux-5.11.3.tar.gz > /dev/null
real	0m4.054s

$ # Wuffs; after
$ time gen/bin/example-zcat < linux-5.11.3.tar.gz > /dev/null
real	0m2.651s

----

Wuffs benchmarks:

wuffs_deflate_decode_1k_full_init/clang9                  95.6MB/s ± 0%  98.1MB/s ± 1%   +2.62%  (p=0.008 n=5+5)
wuffs_deflate_decode_1k_part_init/clang9                   109MB/s ± 0%   112MB/s ± 0%   +3.31%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_full_init/clang9                  162MB/s ± 0%   201MB/s ± 0%  +24.32%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_part_init/clang9                  165MB/s ± 0%   206MB/s ± 0%  +25.16%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/clang9             170MB/s ± 0%   253MB/s ± 0%  +48.63%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/clang9            147MB/s ± 0%   160MB/s ± 0%   +8.77%  (p=0.016 n=4+5)

wuffs_deflate_decode_1k_full_init/gcc10                   92.1MB/s ± 0%  91.7MB/s ± 0%   -0.44%  (p=0.016 n=5+5)
wuffs_deflate_decode_1k_part_init/gcc10                    107MB/s ± 0%   104MB/s ± 0%   -3.35%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_full_init/gcc10                   149MB/s ± 0%   195MB/s ± 0%  +30.68%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k_part_init/gcc10                   152MB/s ± 1%   199MB/s ± 1%  +31.23%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/gcc10              213MB/s ± 0%   256MB/s ± 0%  +20.42%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/gcc10             177MB/s ± 0%   177MB/s ± 1%     ~     (p=0.595 n=5+5)

mimic_deflate_decode_1k                                    128MB/s ± 0%   128MB/s ± 0%   +0.42%  (p=0.016 n=5+4)
mimic_deflate_decode_10k                                   143MB/s ± 0%   143MB/s ± 0%     ~     (p=0.310 n=5+5)
mimic_deflate_decode_100k_just_one_read                    176MB/s ± 0%   176MB/s ± 0%   -0.24%  (p=0.008 n=5+5)
mimic_deflate_decode_100k_many_big_reads                   135MB/s ± 0%   135MB/s ± 0%   +0.12%  (p=0.016 n=5+5)

----

wuffs_gzip_decode_10k/clang9                               166MB/s ± 0%   198MB/s ± 1%  +19.66%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/clang9                              178MB/s ± 0%   241MB/s ± 0%  +35.41%  (p=0.008 n=5+5)

wuffs_gzip_decode_10k/gcc10                                172MB/s ± 0%   199MB/s ± 0%  +15.67%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/gcc10                               198MB/s ± 0%   258MB/s ± 0%  +29.95%  (p=0.008 n=5+5)

mimic_gzip_decode_10k                                      121MB/s ± 0%   121MB/s ± 0%     ~     (p=0.421 n=5+5)
mimic_gzip_decode_100k                                     144MB/s ± 0%   144MB/s ± 0%     ~     (p=0.548 n=5+5)

----

wuffs_zlib_decode_10k/clang9                               154MB/s ± 0%   199MB/s ± 0%  +28.89%  (p=0.016 n=4+5)
wuffs_zlib_decode_100k/clang9                              186MB/s ± 1%   234MB/s ± 1%  +25.58%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/gcc10                                156MB/s ± 0%   202MB/s ± 0%  +30.01%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/gcc10                               198MB/s ± 0%   262MB/s ± 0%  +32.21%  (p=0.008 n=5+5)

mimic_zlib_decode_10k                                      133MB/s ± 0%   133MB/s ± 0%     ~     (p=1.000 n=5+5)
mimic_zlib_decode_100k                                     160MB/s ± 0%   160MB/s ± 0%     ~     (p=0.095 n=5+5)

----

wuffs_png_decode_image_19k_8bpp/clang9                     115MB/s ± 0%   131MB/s ± 0%  +14.45%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9                    153MB/s ± 0%   153MB/s ± 0%   -0.51%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     415MB/s ± 0%   474MB/s ± 0%  +14.37%  (p=0.016 n=4+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   345MB/s ± 1%   371MB/s ± 0%   +7.62%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   335MB/s ± 0%   359MB/s ± 0%   +7.06%  (p=0.016 n=4+5)
wuffs_png_decode_image_4002k_24bpp/clang9                  153MB/s ± 0%   156MB/s ± 0%   +2.37%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                      123MB/s ± 0%   135MB/s ± 1%   +9.38%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                     159MB/s ± 1%   163MB/s ± 0%   +2.60%  (p=0.016 n=5+4)
wuffs_png_decode_image_77k_8bpp/gcc10                      452MB/s ± 0%   479MB/s ± 0%   +6.00%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    353MB/s ± 0%   387MB/s ± 0%   +9.42%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    341MB/s ± 0%   372MB/s ± 0%   +9.07%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   161MB/s ± 0%   164MB/s ± 0%   +1.86%  (p=0.016 n=4+5)

mimic_png_decode_image_19k_8bpp                           58.1MB/s ± 0%  58.2MB/s ± 0%   +0.22%  (p=0.008 n=5+5)
mimic_png_decode_image_40k_24bpp                          73.2MB/s ± 0%  73.2MB/s ± 0%     ~     (p=0.341 n=5+5)
mimic_png_decode_image_77k_8bpp                            177MB/s ± 0%   177MB/s ± 0%     ~     (p=0.095 n=5+5)
mimic_png_decode_image_552k_32bpp_ignore_checksum               skipped
mimic_png_decode_image_552k_32bpp_verify_checksum          147MB/s ± 0%   146MB/s ± 0%     ~     (p=0.056 n=5+5)
mimic_png_decode_image_4002k_24bpp                         104MB/s ± 0%   104MB/s ± 0%     ~     (p=0.841 n=4+5)
2021-03-08 13:19:39 +11:00
Nigel Tao 79c7ba0ae9 Add script/print-crc32-x86-sse42-magic-numbers.go 2021-03-07 22:18:52 +11:00
Nigel Tao 5d4fbc3ac6 Implement std/crc32 ieee_hasher.up_x86_sse42
On a mid-range x86_64 laptop:

----

$ ls -lh linux-5.11.3.tar.gz | awk '{print $5 " " $9}'
178M linux-5.11.3.tar.gz

$ # Debian's /usr/bin/crc32
$ time /usr/bin/crc32 /dev/stdin < linux-5.11.3.tar.gz > /dev/null
real    0m0.411s

$ # Wuffs; before
$ time gen/bin/example-crc32     < linux-5.11.3.tar.gz > /dev/null
real    0m0.137s

$ # Wuffs; after
$ time gen/bin/example-crc32     < linux-5.11.3.tar.gz > /dev/null
real    0m0.060s

----

Wuffs benchmarks:

wuffs_crc32_ieee_10k/clang9                               1.71GB/s ± 0%   8.40GB/s ± 3%  +391.97%  (p=0.008 n=5+5)
wuffs_crc32_ieee_100k/clang9                              1.73GB/s ± 1%  10.67GB/s ± 0%  +518.47%  (p=0.008 n=5+5)

wuffs_crc32_ieee_10k/gcc10                                2.08GB/s ± 0%   8.77GB/s ± 0%  +322.05%  (p=0.008 n=5+5)
wuffs_crc32_ieee_100k/gcc10                               2.10GB/s ± 0%  11.23GB/s ± 0%  +435.56%  (p=0.008 n=5+5)

mimic_crc32_ieee_10k                                       774MB/s ± 0%    776MB/s ± 0%    +0.23%  (p=0.016 n=5+5)
mimic_crc32_ieee_100k                                      773MB/s ± 0%    775MB/s ± 0%    +0.24%  (p=0.032 n=5+5)

wuffs_gzip_decode_10k/clang9                               151MB/s ± 0%    166MB/s ± 0%    +9.81%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/clang9                              155MB/s ± 0%    178MB/s ± 0%   +14.53%  (p=0.008 n=5+5)

wuffs_gzip_decode_10k/gcc10                                150MB/s ± 0%    172MB/s ± 0%   +14.92%  (p=0.008 n=5+5)
wuffs_gzip_decode_100k/gcc10                               188MB/s ± 0%    198MB/s ± 0%    +5.37%  (p=0.008 n=5+5)

mimic_gzip_decode_10k                                      121MB/s ± 0%    121MB/s ± 0%      ~     (p=1.000 n=5+5)
mimic_gzip_decode_100k                                     143MB/s ± 0%    144MB/s ± 0%      ~     (p=0.056 n=5+5)

wuffs_png_decode_image_19k_8bpp/clang9                     111MB/s ± 0%    115MB/s ± 0%    +3.77%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang9                    147MB/s ± 0%    153MB/s ± 0%    +4.66%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     404MB/s ± 0%    415MB/s ± 0%    +2.75%  (p=0.016 n=5+4)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   344MB/s ± 0%    345MB/s ± 1%      ~     (p=0.151 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   329MB/s ± 0%    335MB/s ± 0%    +1.78%  (p=0.016 n=5+4)
wuffs_png_decode_image_4002k_24bpp/clang9                  148MB/s ± 0%    153MB/s ± 0%    +3.38%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                      120MB/s ± 0%    123MB/s ± 0%    +2.62%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                     153MB/s ± 0%    159MB/s ± 1%    +3.54%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc10                      440MB/s ± 0%    452MB/s ± 0%    +2.82%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    357MB/s ± 0%    353MB/s ± 0%    -0.95%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    341MB/s ± 0%    341MB/s ± 0%      ~     (p=0.151 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   157MB/s ± 0%    161MB/s ± 0%    +2.85%  (p=0.016 n=5+4)

mimic_png_decode_image_19k_8bpp                           58.1MB/s ± 0%   58.1MB/s ± 0%      ~     (p=0.389 n=5+5)
mimic_png_decode_image_40k_24bpp                          73.2MB/s ± 0%   73.2MB/s ± 0%      ~     (p=0.548 n=5+5)
mimic_png_decode_image_77k_8bpp                            177MB/s ± 0%    177MB/s ± 0%    +0.14%  (p=0.008 n=5+5)
mimic_png_decode_image_552k_32bpp_ignore_checksum               skipped
mimic_png_decode_image_552k_32bpp_verify_checksum          146MB/s ± 0%    147MB/s ± 0%    +0.13%  (p=0.016 n=5+5)
mimic_png_decode_image_4002k_24bpp                         104MB/s ± 0%    104MB/s ± 0%      ~     (p=0.556 n=5+4)
2021-03-07 12:27:45 +11:00
Nigel Tao 44acd0e20a Add std/crc32 ieee_hasher.up_x86_sse42 placeholder 2021-03-06 11:20:50 +11:00
Nigel Tao 21cc4fa8ba Use more arm_neon_uAxB types and methods 2021-02-24 22:22:30 +11:00
Nigel Tao 3b5d8fdfba Use arm_neon_uAxB types and methods 2021-02-24 16:48:09 +11:00
Nigel Tao 62ee403d06 Add arm_neon u8x8, u16x4, etc types 2021-02-24 14:28:45 +11:00
Nigel Tao fa774e647f Add x86_sse42_utility.make_m128i_slice128 2021-02-18 22:32:21 +11:00
Nigel Tao d4c23d091a Add base.x86_sse42_utility.make_m128i_single_u32 2021-02-18 20:30:59 +11:00
Nigel Tao 8c8f534a5c Add base.x86_sse42_utility 2021-02-18 20:02:58 +11:00
Nigel Tao 869be76fae Rename some std/png c/p variables 2021-02-18 14:32:35 +11:00
Nigel Tao 8c4348b8f6 Rename some std etc_sse42 functions 2021-02-18 13:48:46 +11:00
Nigel Tao 02e0955897 Rename std/png/decode_filter_sse42.wuffs 2021-02-18 13:40:40 +11:00
Nigel Tao 26c7fb941f Un-choosy-fy std/png decoder.filter_2 2021-02-18 13:32:25 +11:00
Nigel Tao 4d2df86a6d Fix some -Werror=conversion false positives 2021-02-16 22:45:50 +11:00
Nigel Tao b77137686d Remove redundant arm_neon zero-initialization 2021-02-16 22:32:06 +11:00
Nigel Tao 9c1af68889 Factor out std/crc32/common_up_arm_crc32.wuffs 2021-02-16 22:27:33 +11:00
Nigel Tao 4c3f8ccfff Factor out std/adler32/common_up_x86_sse42.wuffs 2021-02-16 22:23:54 +11:00
Nigel Tao 010b34ed38 Add std/adler32 hasher.up_arm_neon
On a Raspberry Pi 4 (32-bit armv7l) with -march=native and -mfpu=neon
("native" means "armv8-a+crc+simd"):

wuffs_adler32_10k/clang9                                  1.21GB/s ± 0%   6.58GB/s ± 1%  +442.43%  (p=0.008 n=5+5)
wuffs_adler32_100k/clang9                                 1.20GB/s ± 0%   6.58GB/s ± 0%  +449.37%  (p=0.008 n=5+5)

wuffs_adler32_10k/gcc8                                    1.24GB/s ± 0%   4.31GB/s ± 0%  +248.87%  (p=0.008 n=5+5)
wuffs_adler32_100k/gcc8                                   1.22GB/s ± 0%   4.29GB/s ± 0%  +251.09%  (p=0.008 n=5+5)

mimic_adler32_10k                                         1.40GB/s ± 0%   1.40GB/s ± 0%    -0.04%  (p=0.008 n=5+5)
mimic_adler32_100k                                        1.35GB/s ± 0%   1.38GB/s ± 0%    +2.77%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/clang9                              85.3MB/s ± 0%   91.1MB/s ± 0%    +6.83%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/clang9                              107MB/s ± 0%    113MB/s ± 0%    +5.20%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/gcc8                                86.1MB/s ± 0%   91.0MB/s ± 0%    +5.69%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/gcc8                                104MB/s ± 0%    111MB/s ± 0%    +7.08%  (p=0.016 n=5+4)

mimic_zlib_decode_10k                                      108MB/s ± 0%    108MB/s ± 0%      ~     (p=0.548 n=5+5)
mimic_zlib_decode_100k                                     142MB/s ± 0%    141MB/s ± 1%      ~     (p=0.310 n=5+5)

wuffs_png_decode_image_19k_8bpp/clang9                    69.9MB/s ± 0%   74.3MB/s ± 0%    +6.37%  (p=0.016 n=5+4)
wuffs_png_decode_image_40k_24bpp/clang9                   99.4MB/s ± 0%  104.3MB/s ± 0%    +4.92%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     266MB/s ± 0%    280MB/s ± 0%    +5.21%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   165MB/s ± 0%    169MB/s ± 0%    +2.45%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   146MB/s ± 0%    163MB/s ± 0%   +11.86%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                 93.2MB/s ± 0%   97.7MB/s ± 0%    +4.78%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc8                      70.3MB/s ± 0%   74.3MB/s ± 0%    +5.70%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc8                      101MB/s ± 0%    107MB/s ± 0%    +5.67%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc8                       247MB/s ± 0%    259MB/s ± 0%    +4.71%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc8     162MB/s ± 0%    162MB/s ± 0%    +0.09%  (p=0.032 n=5+4)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc8     140MB/s ± 0%    155MB/s ± 0%   +10.67%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc8                   94.1MB/s ± 0%   99.4MB/s ± 0%    +5.57%  (p=0.008 n=5+5)

mimic_png_decode_image_19k_8bpp                           43.6MB/s ± 0%   43.3MB/s ± 1%      ~     (p=0.167 n=5+5)
mimic_png_decode_image_40k_24bpp                          54.6MB/s ± 0%   54.6MB/s ± 0%      ~     (p=1.000 n=5+5)
mimic_png_decode_image_77k_8bpp                            125MB/s ± 0%    123MB/s ± 0%    -1.03%  (p=0.016 n=5+4)
mimic_png_decode_image_552k_32bpp_ignore_checksum               skipped
mimic_png_decode_image_552k_32bpp_verify_checksum          102MB/s ± 0%    101MB/s ± 0%    -0.43%  (p=0.008 n=5+5)
mimic_png_decode_image_4002k_24bpp                        81.3MB/s ± 0%   81.8MB/s ± 0%    +0.62%  (p=0.008 n=5+5)
2021-02-16 22:17:46 +11:00