Commit Graph
40 Commits
Author SHA1 Message Date
Nigel Tao e541e0cf79 std/crc64: re-write x86_sse42 implementation
name                           old speed      new speed       delta

wuffs_crc64_ecma_10k/clang14   5.84GB/s ± 0%  23.43GB/s ± 0%  +301.23%  (p=0.008 n=5+5)
wuffs_crc64_ecma_100k/clang14  6.18GB/s ± 0%  30.23GB/s ± 1%  +389.45%  (p=0.008 n=5+5)

wuffs_crc64_ecma_10k/gcc12     5.87GB/s ± 1%  24.02GB/s ± 0%  +309.21%  (p=0.008 n=5+5)
wuffs_crc64_ecma_100k/gcc12    6.21GB/s ± 0%  30.68GB/s ± 0%  +394.22%  (p=0.008 n=5+5)

$ time example-mzcat < linux-6.8.2.tar.xz > /dev/null
Before: user 0m7.604s
After:  user 0m7.432s
2024-04-22 14:05:16 +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 decb64e5ea Add ast.ExprOperatorEtc constants 2021-03-29 19:54:51 +11:00
Nigel Tao 41e407a774 Add some ast.Expr.IsEtc methods 2021-03-28 23:07:21 +11:00
Nigel Tao b61a827354 Optimize std/adler32 for SSE4.2
On a mid-range x86_64 laptop:

wuffs_adler32_10k/clang9                                  1.35GB/s ± 0%  10.78GB/s ± 1%  +700.65%  (p=0.008 n=5+5)
wuffs_adler32_100k/clang9                                 1.35GB/s ± 0%  12.88GB/s ± 0%  +856.09%  (p=0.008 n=5+5)

wuffs_adler32_10k/gcc10                                   1.85GB/s ± 0%  11.21GB/s ± 0%  +506.34%  (p=0.008 n=5+5)
wuffs_adler32_100k/gcc10                                  1.84GB/s ± 0%  11.43GB/s ± 0%  +521.51%  (p=0.008 n=5+5)

mimic_adler32_10k                                         1.76GB/s ± 0%   1.76GB/s ± 0%      ~     (p=0.841 n=5+5)
mimic_adler32_100k                                        1.72GB/s ± 0%   1.72GB/s ± 0%      ~     (p=0.222 n=5+5)

wuffs_zlib_decode_10k/clang9                               124MB/s ± 0%    139MB/s ± 0%   +12.29%  (p=0.016 n=4+5)
wuffs_zlib_decode_100k/clang9                              148MB/s ± 0%    155MB/s ± 0%    +4.21%  (p=0.008 n=5+5)

wuffs_zlib_decode_10k/gcc10                                133MB/s ± 1%    141MB/s ± 0%    +5.75%  (p=0.008 n=5+5)
wuffs_zlib_decode_100k/gcc10                               159MB/s ± 0%    172MB/s ± 0%    +7.77%  (p=0.016 n=5+4)

mimic_zlib_decode_10k                                      133MB/s ± 0%    133MB/s ± 0%    +0.38%  (p=0.008 n=5+5)
mimic_zlib_decode_100k                                     160MB/s ± 0%    160MB/s ± 0%      ~     (p=0.841 n=5+5)

wuffs_png_decode_image_19k_8bpp/clang9                    90.6MB/s ± 0%   94.7MB/s ± 0%    +4.58%  (p=0.016 n=5+4)
wuffs_png_decode_image_40k_24bpp/clang9                    129MB/s ± 0%    135MB/s ± 0%    +4.49%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang9                     335MB/s ± 0%    351MB/s ± 0%    +4.62%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9   322MB/s ± 0%    320MB/s ± 1%    -0.71%  (p=0.016 n=4+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9   256MB/s ± 0%    308MB/s ± 0%   +20.24%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang9                  131MB/s ± 0%    138MB/s ± 0%    +5.24%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                     95.1MB/s ± 0%  100.8MB/s ± 1%    +6.08%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                     131MB/s ± 0%    136MB/s ± 0%    +3.65%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc10                      350MB/s ± 1%    371MB/s ± 0%    +6.06%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10    327MB/s ± 0%    333MB/s ± 0%    +1.66%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10    274MB/s ± 0%    318MB/s ± 0%   +15.93%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                   132MB/s ± 0%    138MB/s ± 0%    +4.73%  (p=0.008 n=5+5)

mimic_png_decode_image_19k_8bpp                           58.1MB/s ± 0%   58.2MB/s ± 0%    +0.27%  (p=0.008 n=5+5)
mimic_png_decode_image_40k_24bpp                          73.0MB/s ± 1%   73.3MB/s ± 0%    +0.45%  (p=0.008 n=5+5)
mimic_png_decode_image_77k_8bpp                            177MB/s ± 0%    177MB/s ± 0%      ~     (p=0.421 n=5+5)
mimic_png_decode_image_552k_32bpp_ignore_checksum               skipped
mimic_png_decode_image_552k_32bpp_verify_checksum          146MB/s ± 0%    146MB/s ± 0%      ~     (p=0.310 n=5+5)
mimic_png_decode_image_4002k_24bpp                         104MB/s ± 0%    104MB/s ± 0%      ~     (p=0.056 n=5+5)
2021-01-26 22:31:54 +11:00
Nigel Tao 26a7280900 Add slice base.u8 peek/poke methods
wuffs_png_decode_filter_1_sub/clang9  4.59GB/s ± 0%   4.59GB/s ± 0%      ~     (p=0.151 n=5+5)
wuffs_png_decode_filter_1_sub/gcc10   1.85GB/s ± 0%   4.11GB/s ± 0%  +122.24%  (p=0.016 n=5+4)
2021-01-17 23:47:37 +11:00
Nigel Tao be8542e313 Rename I/O available methods to length 2020-08-13 23:26:08 +10:00
Nigel Tao 31674f9bd2 Let skip_u32_fast take non-constant arguments 2020-07-15 14:10:43 +10:00
Nigel Tao ed48514f30 Remove ast.NewExpr statusPkg arg 2020-06-10 12:05:48 +10:00
Nigel Tao 7405307173 Propagate tighter bounds checks after assignments 2018-12-26 16:52:55 +11:00
Nigel Tao e49d464432 Make _fast explicit in copy_n_from_history_fast 2018-07-08 21:39:18 +10:00
Nigel Tao 9e300fc4f8 Rename unread_u8? to undo_byte!; add can_undo_byte 2018-07-08 21:02:29 +10:00
Nigel Tao ce3d99a6d5 Remove no longer used optimizeSuspendible code 2018-07-08 17:10:34 +10:00
Nigel Tao 5aa16ef671 Use the peek, skip_fast and write_fast methods
No change in the benchmark numbers.
2018-07-08 14:17:16 +10:00
Nigel Tao 26eba56f57 Rename some copy_from_xxx methods 2018-07-08 13:56:49 +10:00
Nigel Tao ccb78f5db7 Rename ast.Node methods from Foo to AsFoo 2018-07-01 20:41:21 +10:00
Nigel Tao 2599476d2c Add skip32_fast method 2018-07-01 11:14:25 +10:00
Nigel Tao bb4477d91f Add peek_uxx methods 2018-07-01 10:26:17 +10:00
Nigel Tao df96e48341 Rename some #ifndef WUFFS_BASE_HEADER_H guards 2018-06-10 09:37:30 +10:00
Nigel Tao 20e459cfb2 Add read_u24be etc methods
Fixes #12
2018-06-02 13:03:24 +10:00
Nigel Tao e00e71da7b Remove ast.FlagsTypeChecked 2018-05-14 16:11:18 +10:00
Nigel Tao d371cc097a Tweak ioMethodAdvance implementation 2018-05-05 09:27:36 +10:00
Nigel Tao e8eeee371a Raise built-in ident capacity from 96 to 768 2018-05-05 09:23:10 +10:00
Nigel Tao 124a329e73 Remove the obsolete is_marked method 2018-04-28 10:13:32 +10:00
Nigel Tao d3342e7b4a Remove wuffs_base__io_{reader,writer} mark field 2018-04-28 09:58:45 +10:00
Nigel Tao eeebd58d7b Remove token ID/Key distinction, part 11 of N 2018-04-15 17:57:10 +10:00
Nigel Tao f95239f6e0 Rename u32, io_reader, etc to base.u32, etc 2018-04-12 21:49:17 +10:00
Nigel Tao 97aab37462 Rename buf1, reader1, etc to io_buffer, io_reader
Also remove the unused Buf1, Buf2 and Usize tokens.
2018-04-05 20:49:48 +10:00
Nigel Tao 7de631fb96 Tighten copy_from_history32__bco preconditions 2018-03-23 11:42:41 +11:00
Nigel Tao 0b06dbcf02 Simplify big.Int comparisons to zero 2018-01-04 11:08:41 +11:00
Nigel Tao 1004d898d5 Add statusPkg arg to ast.NewExpr 2017-12-29 13:33:46 +11:00
Nigel Tao 8b4ba30a36 Rename some ast.Expr methods 2017-12-29 12:58:01 +11:00
Nigel Tao 7601fb45ce Rename String(*token.Map) to Str(*token.Map) 2017-12-01 11:22:08 +11:00
Nigel Tao 024dc7f97a Rename PUFFS to WUFFS, part 11 of N 2017-11-30 18:18:40 +11:00
Nigel Tao 79a94558be Rename PUFFS to WUFFS, part 5 of N 2017-11-30 16:37:20 +11:00
Nigel Tao 0cea46531b Rename PUFFS to WUFFS, part 2 of N 2017-11-30 16:23:16 +11:00
Nigel Tao 1cee9c6ea2 Add note to consider a read_u8_fast method. 2017-11-10 09:56:27 +11:00
Nigel Tao 693af478d6 Rename some bcheckOptimizeXxx methods. 2017-11-09 15:15:30 +11:00
Nigel Tao d2a01dd938 Refactor lang/check/bounds.go. 2017-11-09 15:11:45 +11:00