Nigel Tao
e1f803324b
test: use s/100/300/ digits of pi for crcNN tests
2024-04-22 09:13:22 +10:00
Patrick Georgi
f563f32f82
Add SPDX identifier to license headers
...
SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.
In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
2023-10-06 20:52:36 +02:00
Nigel Tao
74a6ea2fcd
all: relicense from Apache2 to dual Apache2/MIT
...
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).
If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.
The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c
Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
2023-10-06 10:00:59 +11:00
Nigel Tao
38205517d4
test: fix some errors in "compile C as C++"
2023-06-20 17:25:56 +10:00
Nigel Tao
176cdf7527
test: fix gcc -Wmaybe-uninitialized false positive
...
When running "gcc -O3 -Wall test/c/std/adler32.c", gcc 12.2.0 (but not
gcc 10.2.1) would warn that adler32's "checksum.private_impl.f_started"
may be used uninitialized. There is no warning without the "-O3".
That warning is a false positive. f_started is always zero-initialized
by wuffs_adler32__hasher__initialize (unless opted in to
WUFFS_INITIALIZE__ALREADY_ZEROED, which the benchmarks do not).
Also update test/c/std/crc32.c so that all of the base.hasher_u32
wuffs_bench_etc functions are consistent, even though gcc on crc32.c
does not produce that same false positive warning.
2023-04-12 13:31:01 +10:00
Nigel Tao
d5075c7e94
Push "int i" into "for (int i = etc; etc; etc)"
2021-11-02 14:07:58 +11:00
Nigel Tao
be546c3587
Be able to test and bench the libdeflate library
...
name old speed new speed delta
wuffs_adler32_10k/clang9 11.4GB/s ± 2% 11.6GB/s ± 2% +1.26% (p=0.013 n=9+10)
wuffs_adler32_100k/clang9 13.7GB/s ± 1% 13.6GB/s ± 1% ~ (p=0.277 n=8+9)
wuffs_adler32_10k/gcc10 12.2GB/s ± 0% 11.4GB/s ± 1% -7.01% (p=0.000 n=8+9)
wuffs_adler32_100k/gcc10 12.0GB/s ± 1% 11.7GB/s ± 1% -2.80% (p=0.000 n=9+9)
mimic_adler32_10k 1.91GB/s ± 0% 25.24GB/s ± 1% +1218.88% (p=0.000 n=9+9)
mimic_adler32_100k 1.87GB/s ± 0% 22.94GB/s ± 1% +1126.66% (p=0.000 n=10+10)
wuffs_crc32_ieee_10k/clang9 7.81GB/s ± 0% 7.70GB/s ± 0% -1.41% (p=0.000 n=8+8)
wuffs_crc32_ieee_100k/clang9 10.0GB/s ± 2% 10.6GB/s ± 1% +5.25% (p=0.000 n=7+8)
wuffs_crc32_ieee_10k/gcc10 9.80GB/s ± 1% 10.03GB/s ± 1% +2.35% (p=0.000 n=9+10)
wuffs_crc32_ieee_100k/gcc10 13.1GB/s ± 0% 12.9GB/s ± 0% -1.52% (p=0.000 n=10+9)
mimic_crc32_ieee_10k 842MB/s ± 1% 12952MB/s ± 0% +1437.67% (p=0.000 n=10+9)
mimic_crc32_ieee_100k 838MB/s ± 2% 13363MB/s ± 1% +1493.79% (p=0.000 n=10+9)
wuffs_deflate_decode_1k_full_init/clang9 101MB/s ± 0% 106MB/s ± 1% +4.22% (p=0.000 n=8+10)
wuffs_deflate_decode_1k_part_init/clang9 119MB/s ± 1% 121MB/s ± 1% +1.39% (p=0.000 n=10+10)
wuffs_deflate_decode_10k_full_init/clang9 222MB/s ± 0% 215MB/s ± 0% -3.24% (p=0.000 n=9+9)
wuffs_deflate_decode_10k_part_init/clang9 228MB/s ± 0% 218MB/s ± 3% -4.47% (p=0.000 n=10+9)
wuffs_deflate_decode_100k_just_one_read/clang9 291MB/s ± 0% 286MB/s ± 3% -1.85% (p=0.000 n=10+10)
wuffs_deflate_decode_100k_many_big_reads/clang9 189MB/s ± 1% 178MB/s ± 1% -5.50% (p=0.000 n=10+10)
wuffs_deflate_decode_1k_full_init/gcc10 99.1MB/s ± 2% 102.1MB/s ± 1% +3.12% (p=0.000 n=10+9)
wuffs_deflate_decode_1k_part_init/gcc10 117MB/s ± 1% 121MB/s ± 1% +3.41% (p=0.000 n=10+9)
wuffs_deflate_decode_10k_full_init/gcc10 215MB/s ± 1% 218MB/s ± 1% +1.55% (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc10 220MB/s ± 1% 225MB/s ± 0% +2.08% (p=0.000 n=10+8)
wuffs_deflate_decode_100k_just_one_read/gcc10 281MB/s ± 1% 279MB/s ± 1% ~ (p=0.105 n=10+10)
wuffs_deflate_decode_100k_many_big_reads/gcc10 182MB/s ± 1% 180MB/s ± 0% -1.14% (p=0.000 n=9+7)
mimic_deflate_decode_1k_full_init 138MB/s ± 1% 179MB/s ± 1% +29.56% (p=0.000 n=10+10)
mimic_deflate_decode_10k_full_init 155MB/s ± 2% 268MB/s ± 1% +72.15% (p=0.000 n=9+10)
mimic_deflate_decode_100k_just_one_read 191MB/s ± 0% 269MB/s ± 1% +40.38% (p=0.000 n=10+10)
mimic_deflate_decode_100k_many_big_reads 147MB/s ± 1% skipped
wuffs_gzip_decode_10k/clang9 218MB/s ± 1% 211MB/s ± 1% -3.18% (p=0.000 n=8+9)
wuffs_gzip_decode_100k/clang9 282MB/s ± 0% 282MB/s ± 0% ~ (p=0.113 n=9+9)
wuffs_gzip_decode_10k/gcc10 215MB/s ± 1% 231MB/s ± 1% +7.34% (p=0.000 n=10+10)
wuffs_gzip_decode_100k/gcc10 271MB/s ± 2% 293MB/s ± 0% +7.84% (p=0.000 n=10+9)
mimic_gzip_decode_10k 132MB/s ± 1% 263MB/s ± 0% +99.23% (p=0.000 n=10+9)
mimic_gzip_decode_100k 156MB/s ± 1% 262MB/s ± 3% +67.93% (p=0.000 n=9+10)
wuffs_zlib_decode_10k/clang9 223MB/s ± 0% 212MB/s ± 1% -5.05% (p=0.000 n=7+10)
wuffs_zlib_decode_100k/clang9 280MB/s ± 0% 280MB/s ± 0% ~ (p=0.867 n=8+7)
wuffs_zlib_decode_10k/gcc10 232MB/s ± 2% 220MB/s ± 1% -5.42% (p=0.000 n=10+10)
wuffs_zlib_decode_100k/gcc10 286MB/s ± 5% 277MB/s ± 0% -2.88% (p=0.002 n=10+9)
mimic_zlib_decode_10k 145MB/s ± 0% 266MB/s ± 0% +84.02% (p=0.000 n=10+9)
mimic_zlib_decode_100k 173MB/s ± 1% 265MB/s ± 2% +53.31% (p=0.000 n=10+9)
2021-04-20 23:33:58 +10:00
Nigel Tao
ad40102c5a
Change mimic marker symbol from "!!" to "¿"
2021-03-25 22:22:27 +11:00
Nigel Tao
2f78804e62
Use more inclusive language
2021-01-23 19:50:47 +11:00
Nigel Tao
f45f01f4f3
Update clang-format from v5 to v9
2020-06-05 14:06:56 +10:00
Nigel Tao
b72dd16f9b
Have test/* global variable names start with g_
2020-03-27 17:12:38 +11:00
Nigel Tao
c5c10e95b7
Remove some superfluous empty // comments
2020-03-18 21:58:19 +11:00
Nigel Tao
1da8110462
Rename test/c test_cases loop variable
2020-02-26 10:25:30 +11:00
Nigel Tao
2914bae3b2
Re-format C function signatures
2020-02-26 09:40:30 +11:00
Nigel Tao
51b1258b61
Rename test/c throughput_counter enums
2020-02-25 22:46:49 +11:00
Nigel Tao
7b199116b0
Rename s/got/have/ in test/c
2020-02-24 21:23:58 +11:00
Nigel Tao
e77c5d7001
Have hasher_u32 test take a filename arg
2020-01-12 11:38:18 +11:00
Nigel Tao
72fcc2d94f
Add upcast methods
2020-01-10 14:04:07 +11:00
Nigel Tao
7f1572ca16
Add CHECK_STATUS testlib macro
2020-01-05 12:50:56 +11:00
Nigel Tao
77a5311c4b
Add CHECK_STRING testlib macro
2020-01-05 11:19:22 +11:00
Nigel Tao
e6db7f6a40
Make wuffs_base__status a struct
2020-01-05 10:48:20 +11:00
Nigel Tao
c50f16e58b
Separate status and status_msg local variables
2020-01-04 11:57:33 +11:00
Nigel Tao
8ff9cdb9a6
Rename hasher update_u32 method
2019-11-20 21:07:22 +11:00
Nigel Tao
881474be5a
Remove "0 means no I/O limit" in tests
2019-07-06 08:41:46 +10:00
Nigel Tao
ffeb2bff63
Split benchmarks for full / partial initialization
2019-02-24 16:54:19 +11:00
Nigel Tao
d78101625e
Raise hash tests' digits-of-pi data length
2019-02-24 11:44:22 +11:00
Nigel Tao
b41f121d20
Make "uninitialized internal buffers" explicit
2019-02-16 14:02:32 +11:00
Nigel Tao
37a5ead3b7
Have tests let the initializers memset to zero
2019-02-10 14:08:21 +11:00
Nigel Tao
670b45be53
Add some "horizontal rule" comment lines
2019-02-02 08:10:08 +11:00
Nigel Tao
11d7629efd
Fix a "release/c/etc.c" comment typo
2018-12-29 15:20:38 +11:00
Nigel Tao
dd94ad3821
Rename z variable to status, in C code
2018-12-28 16:14:03 +11:00
Nigel Tao
04c91f1410
Generate .c files instead of .h files
...
The files' contents haven't changed (other than some relative #include's
that refer to other .c files).
Some build systems have difficulty recognizing .h files as things to be
compiled, instead of just things referred to by things to be compiled.
2018-12-22 15:29:00 +11:00
Nigel Tao
34fe051cac
Add commentary about the CRC-32 implementation
2018-11-11 10:25:19 +11:00
Nigel Tao
3854ce3e89
Let test binaries run from any dir in the repo
...
Also spin out generate.WuffsRoot into its own package.
2018-11-03 08:46:31 +11:00
Nigel Tao
6cc954d7e1
Have tests return a "const char*" status
2018-09-22 08:43:56 +10:00
Nigel Tao
6fed251b40
Split an io_buffer's fields into data and meta
2018-09-15 08:45:50 +10:00
Nigel Tao
b840c80040
Make the status type a const char*, not a struct
2018-08-12 16:05:14 +10:00
Nigel Tao
2a32a86a6c
Make the status type a struct, not an int32_t
2018-08-11 13:27:29 +10:00
Nigel Tao
fd43e777bc
Have check_wuffs_version return a status code
2018-08-05 22:29:54 +10:00
Jimmy Casey
3c50ada2c6
Fixed Spelling.
2018-07-26 17:12:19 +00:00
Nigel Tao
bc82e51371
Rename wuffs-unsupported-snapshot.h
2018-07-21 09:20:10 +10:00
Nigel Tao
a0bafff465
Ship as a "single file C library"
2018-07-14 08:59:36 +10:00
Nigel Tao
6183aba9d7
Capitalize the $CC and $CXX environment variables
2018-06-30 10:43:26 +10:00
Nigel Tao
43bb14e886
Redo the encoding of error codes
2018-06-10 21:22:41 +10:00
Nigel Tao
5b08ad2ba6
Change the order of check_wuffs_version args
...
This puts the self_ptr, self_len args next to each other.
2018-05-29 21:59:50 +10:00
Nigel Tao
87ab36f8c4
Have check_wuffs_version take the sizeof receiver
...
Also rename foo__initialize to foo__check_wuffs_version.
2018-05-29 14:20:27 +10:00
Nigel Tao
a2044fdaa6
Drop the ".c" in "std/gif.c" test output
2018-05-05 11:38:31 +10:00
Nigel Tao
ba98b04307
Add an iterscale flag
2018-05-04 17:17:59 +10:00
Nigel Tao
4e55710afc
Call the set_limit method
2018-04-28 14:36:16 +10:00
Nigel Tao
eecdaba4e8
Rename crc32.ieee to crc32.ieee_hasher
2018-04-27 20:23:45 +10:00