Nigel Tao
a66a083e82
Have X86_FAMILY allow 32-bit x86, not just x86_64
...
Fixes #53
2021-08-22 22:37:48 +10:00
Nigel Tao
cb2e49ab09
Rename CPU arch macro s/X86_64/X86_FAMILY/
2021-08-22 22:23:49 +10:00
Nigel Tao
786fc74b92
wuffs gen -version=0.3.0-beta.9
2021-08-15 13:49:26 +10:00
Nigel Tao
a86fd7fa79
Fix -Werror=sign-conversion in intconv-submodule.c
2021-08-15 13:48:04 +10:00
Nigel Tao
341dd50800
Add more internal errors to wuffs_aux Cbor, Json
2021-08-15 13:40:17 +10:00
Nigel Tao
a83b5cabaf
Fix "-(int64_t)0x8000000000000000" undef behavior
...
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37191
2021-08-15 12:39:01 +10:00
Nigel Tao
8a4f61501b
Add NULL-check for io_{read,writ}er.position()
2021-08-15 11:13:26 +10: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
1b9a6cb85b
wuffs gen -version=0.3.0-beta.8
2021-07-20 14:21:21 +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
e88e28259e
wuffs gen -version=0.3.0-beta.7
2021-07-18 11:36:39 +10:00
Nigel Tao
6a30c1ede0
Inline wuffs_aux::DecodeJson work_buf variable
2021-07-18 11:25:46 +10:00
Nigel Tao
9c07523a84
Have wuffs_aux::DecodeJson consume trailing filler
...
Prior to this commit, wuffs_aux::DecodeJson would almost always consume
(optional) trailing filler, but in rare coincidences, it might not if a
wuffs_base__suspension__short_write coroutine suspension was needed
between the last token of the actual JSON value and the first token of
the filler after that JSON value.
This commit should change behavior only if the wuffs_aux::DecodeJson
caller had opted into WUFFS_JSON__QUIRK_ALLOW_TRAILING_FILLER or
WUFFS_JSON__QUIRK_EXPECT_TRAILING_NEW_LINE_OR_EOF.
Also remove an unnecessary std::move on a size_t typed value.
2021-07-18 11:12:41 +10:00
Nigel Tao
d0451190ca
wuffs gen -version=0.3.0-beta.6
2021-07-05 21:51:37 +10:00
Nigel Tao
3842c519c9
Delete the WUFFS_BASE__FALLTHROUGH macro
...
Getting it to work on various compilers has been more trouble than it's
worth. The previous commit ignores "-Wimplicit-fallthrough" instead.
2021-07-05 21:40:25 +10:00
Nigel Tao
ea50956b5a
Ignore "-Wimplicit-fallthrough"
2021-07-05 21:40:25 +10:00
Nigel Tao
fd90553a8f
Tweak the WUFFS_BASE__FALLTHROUGH macro
...
When compiling with "-Werror,-Wimplicit-fallthrough", commit c90cc7b6
tweaked WUFFS_BASE__FALLTHROUGH to work with newer clang compilers, when
defined(__cplusplus) is false, but inadvertently broke older clang
compilers, when __has_attribute(fallthrough) is false.
This commit reverts some of c90cc7b6 to handle more cases. The next two
commits will delete the WUFFS_BASE__FALLTHROUGH macro entirely and
render this commit redundant, as the whole business is proving more
trouble than it's worth. But it's checked into the commit history in
case somebody in the future wants to revive WUFFS_BASE__FALLTHROUGH.
2021-07-05 21:40:18 +10:00
Nigel Tao
963a574f7d
wuffs gen -version=0.3.0-beta.5
2021-07-02 13:44:55 +10:00
Peter Kasting
56d5aa0907
Fix -Wunreachable-code-aggressive.
...
Bug: chromium:1066980
2021-06-29 12:00:03 -07:00
Nigel Tao
6bfaf0f008
wuffs gen -version=0.3.0-beta.4
2021-06-28 10:11:25 +10:00
Nigel Tao
b9a10d051a
Fix -Werror=conversion in fundamental-public.h
2021-06-28 10:10:13 +10:00
Nigel Tao
7f93a94e7a
Tweak WUFFS_BASE__FALLTHROUGH comment
2021-06-28 10:07:01 +10:00
Nigel Tao
d8796aa6d9
Add wuffs_base__uxx__rotate_etc functions
2021-06-28 09:59:32 +10:00
Peter Kasting
c90cc7b657
Fix -Wimplicit-fallthrough for Clang.
...
WUFFS_BASE__FALLTHROUGH was not defined because the generated output is
C (so __cplusplus is never defined) and Clang was explicitly excluded
from the __attribute__ case (though it would have worked).
Instead test for the availability of the fallthrough attribute directly,
which should be more portable.
Bug: chromium:995993
2021-06-26 17:12:56 -07:00
Nigel Tao
b2b8961126
wuffs gen -version=0.3.0-beta.3
2021-06-25 15:36:54 +10:00
Nigel Tao
f6945c0612
Remove unnecessary "goto ok;" in generated C code
2021-06-25 14:47:10 +10:00
Nigel Tao
76e6872498
Have clang-cl ignore unused-function etc warnings
2021-06-25 13:51:27 +10:00
Nigel Tao
98c66ef761
wuffs gen -version=0.3.0-beta.2
2021-06-24 22:43:15 +10:00
Nigel Tao
91857f4c4b
Disable cpu_arch specific code for Native Client
2021-06-24 22:40:54 +10:00
Nigel Tao
08797bc713
Have "x86_avx2" require PCLMUL, POPCNT and SSE4.2
...
The std/crc32 benchmark numbers get worse. The benches still run AVX2
code, but it runs slower for an unknown reason. The std/gzip and std/png
benchmark numbers are mixed.
Still, it's cleaner for Wuffs' "x86_avx2" to be a superset of
"x86_sse42" (and apart from PCLMUL, they're now similar to Clang 12 and
GCC 11's "x86-64-v3" and "x86-64-v2" micro-architecture feature levels).
Maybe future compiler versions can claw back the std/crc32 performance.
On a mid-range x86_64 laptop (2016, Skylake):
name old speed new speed delta
wuffs_crc32_ieee_10k/clang9 8.07GB/s ± 0% 7.61GB/s ± 1% -5.72% (p=0.000 n=8+8)
wuffs_crc32_ieee_100k/clang9 11.0GB/s ± 1% 9.7GB/s ± 3% -11.45% (p=0.000 n=7+8)
wuffs_crc32_ieee_10k/gcc10 9.77GB/s ± 1% 7.72GB/s ± 1% -21.00% (p=0.000 n=10+9)
wuffs_crc32_ieee_100k/gcc10 12.7GB/s ± 2% 11.9GB/s ± 2% -5.84% (p=0.000 n=9+9)
wuffs_gzip_decode_10k/clang9 217MB/s ± 2% 221MB/s ± 0% +1.80% (p=0.000 n=10+8)
wuffs_gzip_decode_100k/clang9 280MB/s ± 1% 283MB/s ± 0% +1.38% (p=0.000 n=9+8)
wuffs_gzip_decode_10k/gcc10 215MB/s ± 1% 220MB/s ± 1% +2.52% (p=0.000 n=10+9)
wuffs_gzip_decode_100k/gcc10 272MB/s ± 0% 274MB/s ± 1% +0.74% (p=0.000 n=9+10)
wuffs_png_decode_image_19k_8bpp/clang9 136MB/s ± 0% 142MB/s ± 0% +3.95% (p=0.000 n=8+8)
wuffs_png_decode_image_40k_24bpp/clang9 171MB/s ± 1% 172MB/s ± 0% +0.84% (p=0.000 n=10+8)
wuffs_png_decode_image_77k_8bpp/clang9 492MB/s ± 3% 501MB/s ± 2% +1.88% (p=0.009 n=10+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 456MB/s ± 1% 461MB/s ± 1% +1.04% (p=0.000 n=9+9)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 439MB/s ± 1% 440MB/s ± 3% ~ (p=0.173 n=8+10)
wuffs_png_decode_image_4002k_24bpp/clang9 172MB/s ± 1% 174MB/s ± 1% +1.29% (p=0.005 n=10+10)
wuffs_png_decode_image_19k_8bpp/gcc10 152MB/s ± 0% 149MB/s ± 1% -1.92% (p=0.000 n=9+9)
wuffs_png_decode_image_40k_24bpp/gcc10 184MB/s ± 0% 186MB/s ± 1% +1.37% (p=0.000 n=8+9)
wuffs_png_decode_image_77k_8bpp/gcc10 550MB/s ± 1% 542MB/s ± 2% -1.46% (p=0.000 n=10+10)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 473MB/s ± 1% 478MB/s ± 1% +1.23% (p=0.000 n=9+10)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 453MB/s ± 1% 458MB/s ± 1% +0.91% (p=0.000 n=9+10)
wuffs_png_decode_image_4002k_24bpp/gcc10 185MB/s ± 2% 188MB/s ± 0% +1.82% (p=0.000 n=9+8)
2021-06-22 13:27:25 +10:00
Nigel Tao
3358730f6f
Have std/png reject zero width or height
2021-05-11 12:34:19 +10:00
Nigel Tao
b8f87debe3
Tweak wuffs_base__cpu_arch__have_foo_bar impl
2021-04-29 17:52: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
8ccaf81e96
Fix s/bit_BMI2/bit_AVX2/ typo
2021-04-26 22:52:27 +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
235c9301c3
wuffs gen -version=0.3.0-beta.1
2021-04-05 22:44:12 +10:00
Nigel Tao
c86ac5baef
Add wuffs_base__table__flattened_length
2021-04-03 11:01:46 +11:00
Nigel Tao
314d265fe8
Spin out wuffs_aux Alloc{Pixbuf,Workbuf}Result
2021-04-02 23:57:18 +11:00
Nigel Tao
163bc2626c
Add wuffs_base__pixel_buffer__set_interleaved
2021-04-02 23:15:20 +11:00
Nigel Tao
543ac9af28
Restrict "ignore -Wold-style-cast" to C++
2021-04-02 22:43:55 +11:00
Nigel Tao
c1c8ccbaf2
Add ETC_PIXEL_FORMAT__INDEXED__PALETTE_BYTE_LENGTH
2021-04-02 22:13:33 +11:00
Nigel Tao
97e30c29da
Add some more #pragma's for GCC to ignore warnings
2021-04-02 19:21:54 +11:00
Nigel Tao
9b5d9b46ae
Add some virtual destructors
2021-04-02 08:52:49 +11:00