Commit Graph
776 Commits
Author SHA1 Message Date
Nigel Tao 635c3c8fe9 Rename foo.raczlib to foo.rac 2019-08-08 11:31:30 +10:00
Nigel Tao eb017abd31 Have ractool parse "2k" to mean 2048 2019-08-08 11:27:25 +10:00
Nigel Tao 1944a35d4c Add more commentary to ractool's indexlocation 2019-08-08 10:48:01 +10:00
Nigel Tao 917f028f46 Default ractool to use dchunksize not cchunksize 2019-08-08 10:43:54 +10:00
Nigel Tao 737571cef8 Generate ractool's usage from its doc comment 2019-08-08 10:36:43 +10:00
Nigel Tao 6e3c54256c Re-organize ractool's usage as a doc comment 2019-08-08 10:21:37 +10:00
Nigel Tao 290b2256ce Add a -drange flage to cmd/ractool 2019-08-07 15:34:15 +10:00
Nigel Tao b65807d79d Have cmd/ractool support decoding 2019-08-06 17:37:30 +10:00
Nigel Tao d3c33aa232 Add cmd/ractool and lib/raczlib 2019-06-16 11:36:29 +10:00
Nigel Tao 6826f2f748 Move internal/cgen up a couple of directories 2019-03-09 13:28:59 +11:00
Nigel Tao 489284dfda Remove the deprecated foo__check_wuffs_version 2019-03-09 11:11:41 +11:00
Nigel Tao c4b8a6a4cc Don't use designated initializers
Some C/C++ compilers, such as MSVC, don't always support them. They're
also not supported by GCC's "g++ -std=c++11 -Wpedantic".
2019-03-09 10:08:00 +11:00
Nigel Tao fbd1ae8391 Disable -Wmaybe-uninitialized for GCC 2019-02-24 17:22:14 +11:00
Nigel Tao ffeb2bff63 Split benchmarks for full / partial initialization 2019-02-24 16:54:19 +11:00
Nigel Tao dd861416ff Allow calling pure functions after seeing an error
Updates #20
2019-02-24 11:13:51 +11:00
Nigel Tao 045f180a6c Rename errors from "?msg" to "#msg" 2019-02-23 17:06:24 +11:00
Nigel Tao 8b2c948f1b Work around clang memset / branch performance
name                                             old speed      new speed      delta

wuffs_deflate_decode_1k/clang5                    163MB/s ± 0%   163MB/s ± 0%    ~     (p=0.151 n=5+5)
wuffs_deflate_decode_10k/clang5                   230MB/s ± 1%   234MB/s ± 0%  +1.60%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/clang5    262MB/s ± 1%   265MB/s ± 0%  +0.97%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/clang5   220MB/s ± 0%   221MB/s ± 0%  +0.59%  (p=0.008 n=5+5)

wuffs_deflate_decode_1k/gcc7                      193MB/s ± 1%   194MB/s ± 0%    ~     (p=0.151 n=5+5)
wuffs_deflate_decode_10k/gcc7                     276MB/s ± 1%   276MB/s ± 1%    ~     (p=0.690 n=5+5)
wuffs_deflate_decode_100k_just_one_read/gcc7      325MB/s ± 0%   324MB/s ± 1%    ~     (p=0.690 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/gcc7     258MB/s ± 1%   258MB/s ± 0%    ~     (p=0.690 n=5+5)

wuffs_gif_decode_1k_bw/clang5                     430MB/s ± 1%   445MB/s ± 1%  +3.58%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color/clang5                  186MB/s ± 1%   192MB/s ± 0%  +3.17%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang5                  729MB/s ± 1%   748MB/s ± 1%  +2.53%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang5               196MB/s ± 1%   202MB/s ± 1%  +2.71%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang5                       242MB/s ± 2%   251MB/s ± 0%  +3.54%  (p=0.016 n=5+4)
wuffs_gif_decode_100k_artificial/clang5           539MB/s ± 1%   545MB/s ± 1%    ~     (p=0.095 n=5+5)
wuffs_gif_decode_100k_realistic/clang5            221MB/s ± 0%   226MB/s ± 1%  +2.32%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k/clang5                     224MB/s ± 0%   230MB/s ± 1%  +2.28%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/clang5           1.06GB/s ± 0%  1.07GB/s ± 1%  +1.31%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/gcc7                       478MB/s ± 0%   467MB/s ± 0%  -2.27%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color/gcc7                    194MB/s ± 0%   196MB/s ± 0%  +0.94%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc7                    635MB/s ± 1%   639MB/s ± 1%    ~     (p=0.056 n=5+5)
wuffs_gif_decode_10k_indexed/gcc7                 200MB/s ± 1%   202MB/s ± 1%    ~     (p=0.095 n=5+5)
wuffs_gif_decode_20k/gcc7                         242MB/s ± 1%   243MB/s ± 1%    ~     (p=0.421 n=5+5)
wuffs_gif_decode_100k_artificial/gcc7             509MB/s ± 0%   510MB/s ± 0%    ~     (p=1.000 n=5+5)
wuffs_gif_decode_100k_realistic/gcc7              210MB/s ± 0%   211MB/s ± 0%  +0.50%  (p=0.016 n=5+5)
wuffs_gif_decode_1000k/gcc7                       214MB/s ± 0%   214MB/s ± 0%    ~     (p=0.151 n=5+5)
wuffs_gif_decode_anim_screencap/gcc7             1.03GB/s ± 0%  1.03GB/s ± 1%    ~     (p=0.421 n=5+5)

wuffs_lzw_decode_20k/clang5                       263MB/s ± 1%   267MB/s ± 2%    ~     (p=0.151 n=5+5)
wuffs_lzw_decode_100k/clang5                      427MB/s ± 1%   451MB/s ± 2%  +5.61%  (p=0.008 n=5+5)

wuffs_lzw_decode_20k/gcc7                         270MB/s ± 0%   268MB/s ± 0%  -0.66%  (p=0.008 n=5+5)
wuffs_lzw_decode_100k/gcc7                        481MB/s ± 1%   483MB/s ± 1%    ~     (p=0.222 n=5+5)
2019-02-23 12:47:41 +11:00
Nigel Tao 2952f130f6 Fold a memset call into an initialize call 2019-02-16 14:28:47 +11:00
Nigel Tao 02563641da Eliminate a wuffs_base__return_empty_struct call 2019-02-16 14:23:24 +11:00
Nigel Tao b41f121d20 Make "uninitialized internal buffers" explicit 2019-02-16 14:02:32 +11:00
Nigel Tao ff399c0e78 Delete wuffs_base__pixel_config::initialize 2019-02-16 09:04:59 +11:00
Nigel Tao ab7d6de318 Let Wuffs compile with MSVC (Microsoft Visual C++) 2019-02-16 09:02:33 +11:00
Nigel Tao 0ab52c6204 Move cgen's sub-structs to private_data
name                                             old speed      new speed      delta

wuffs_gif_decode_1k_bw/clang5                     243MB/s ± 1%   243MB/s ± 1%    ~     (p=0.101 n=47+48)
wuffs_gif_decode_1k_color/clang5                  142MB/s ± 1%   142MB/s ± 1%  +0.36%  (p=0.000 n=48+47)
wuffs_gif_decode_10k_bgra/clang5                  734MB/s ± 1%   728MB/s ± 1%  -0.78%  (p=0.000 n=46+50)
wuffs_gif_decode_10k_indexed/clang5               197MB/s ± 0%   196MB/s ± 1%  -0.52%  (p=0.000 n=47+46)
wuffs_gif_decode_20k/clang5                       250MB/s ± 1%   249MB/s ± 1%    ~     (p=0.189 n=49+46)
wuffs_gif_decode_100k_artificial/clang5           556MB/s ± 1%   555MB/s ± 1%  -0.23%  (p=0.000 n=46+44)
wuffs_gif_decode_100k_realistic/clang5            229MB/s ± 1%   229MB/s ± 0%    ~     (p=0.055 n=48+48)
wuffs_gif_decode_1000k/clang5                     233MB/s ± 1%   234MB/s ± 0%  +0.30%  (p=0.000 n=48+45)
wuffs_gif_decode_anim_screencap/clang5           1.11GB/s ± 1%  1.10GB/s ± 0%  -0.28%  (p=0.000 n=46+47)

wuffs_gif_decode_1k_bw/gcc7                       257MB/s ± 2%   263MB/s ± 1%  +2.67%  (p=0.000 n=49+47)
wuffs_gif_decode_1k_color/gcc7                    142MB/s ± 1%   146MB/s ± 1%  +3.25%  (p=0.000 n=50+49)
wuffs_gif_decode_10k_bgra/gcc7                    627MB/s ± 1%   625MB/s ± 1%  -0.35%  (p=0.000 n=48+49)
wuffs_gif_decode_10k_indexed/gcc7                 197MB/s ± 1%   196MB/s ± 1%  -0.21%  (p=0.000 n=48+43)
wuffs_gif_decode_20k/gcc7                         239MB/s ± 0%   239MB/s ± 1%  +0.21%  (p=0.000 n=50+47)
wuffs_gif_decode_100k_artificial/gcc7             511MB/s ± 0%   512MB/s ± 1%  +0.21%  (p=0.000 n=49+44)
wuffs_gif_decode_100k_realistic/gcc7              211MB/s ± 0%   212MB/s ± 1%  +0.39%  (p=0.000 n=45+44)
wuffs_gif_decode_1000k/gcc7                       215MB/s ± 0%   216MB/s ± 1%  +0.13%  (p=0.002 n=46+48)
wuffs_gif_decode_anim_screencap/gcc7             1.06GB/s ± 1%  1.06GB/s ± 1%  +0.12%  (p=0.007 n=45+48)

wuffs_lzw_decode_20k/clang5                       271MB/s ± 1%   270MB/s ± 1%  -0.34%  (p=0.000 n=49+49)
wuffs_lzw_decode_100k/clang5                      480MB/s ± 1%   478MB/s ± 1%  -0.31%  (p=0.001 n=48+50)

wuffs_lzw_decode_20k/gcc7                         263MB/s ± 1%   264MB/s ± 1%  +0.38%  (p=0.000 n=45+47)
wuffs_lzw_decode_100k/gcc7                        476MB/s ± 1%   482MB/s ± 2%  +1.30%  (p=0.000 n=47+50)
2019-02-10 11:22:04 +11:00
Nigel Tao 664c47fe3c Have initialize zero private_impl but not _data 2019-02-09 19:54:29 +11:00
Nigel Tao 250257e3c0 Spin out some cgen fields to a private_data struct 2019-02-09 19:49:09 +11:00
Nigel Tao 4f76d2f893 Rename some check_wuffs_version status messages 2019-02-09 14:56:27 +11:00
Nigel Tao 451301137f Look for WUFFS_INITIALIZE__ALREADY_ZEROED 2019-02-09 14:48:15 +11:00
Nigel Tao f8daf3d219 Add contains_range and contains_rect methods 2019-02-09 13:42:17 +11:00
Nigel Tao 8794a586ac Add wuffs_foo__bar__initialize methods 2019-02-09 12:54:02 +11:00
Nigel Tao 10ead58e2e Add temporary wuffs_base__pixel_config::initialize 2019-02-09 11:45:01 +11:00
Nigel Tao 957182fde7 Re-arrange coro_susp_point's and coro stacks 2019-02-09 11:15:56 +11:00
Nigel Tao 9518af5a95 Separate the coro_susp_point from the coro stack 2019-02-09 11:03:50 +11:00
Nigel Tao f877fb2c59 Use the workbuf instead of lzw.decoder.suffixes
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.

name                                     old speed      new speed      delta

wuffs_lzw_decode_20k/clang5               255MB/s ± 0%   241MB/s ± 0%   -5.63%  (p=0.008 n=5+5)
wuffs_lzw_decode_100k/clang5              418MB/s ± 1%   401MB/s ± 1%   -4.02%  (p=0.008 n=5+5)

wuffs_lzw_decode_20k/gcc7                 255MB/s ± 1%   235MB/s ± 0%   -7.88%  (p=0.008 n=5+5)
wuffs_lzw_decode_100k/gcc7                444MB/s ± 1%   382MB/s ± 0%  -13.90%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/clang5             239MB/s ± 2%   235MB/s ± 1%   -1.89%  (p=0.016 n=5+5)
wuffs_gif_decode_1k_color/clang5          135MB/s ± 0%   132MB/s ± 0%   -1.86%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang5          692MB/s ± 1%   678MB/s ± 0%   -2.08%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang5       186MB/s ± 0%   181MB/s ± 0%   -2.58%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang5               237MB/s ± 1%   226MB/s ± 0%   -4.46%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang5   536MB/s ± 0%   506MB/s ± 0%   -5.53%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/clang5    219MB/s ± 0%   203MB/s ± 1%   -7.11%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k/clang5             222MB/s ± 0%   206MB/s ± 0%   -7.25%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/clang5   1.07GB/s ± 0%  1.04GB/s ± 1%   -3.11%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/gcc7               262MB/s ± 0%   255MB/s ± 1%   -2.63%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color/gcc7            142MB/s ± 1%   137MB/s ± 1%   -3.38%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc7            596MB/s ± 1%   593MB/s ± 0%     ~     (p=0.151 n=5+5)
wuffs_gif_decode_10k_indexed/gcc7         185MB/s ± 0%   182MB/s ± 2%   -1.63%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc7                 230MB/s ± 0%   226MB/s ± 0%   -1.78%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc7     490MB/s ± 1%   488MB/s ± 0%     ~     (p=0.095 n=5+5)
wuffs_gif_decode_100k_realistic/gcc7      203MB/s ± 1%   203MB/s ± 0%     ~     (p=0.421 n=5+5)
wuffs_gif_decode_1000k/gcc7               207MB/s ± 0%   207MB/s ± 0%     ~     (p=1.000 n=5+5)
wuffs_gif_decode_anim_screencap/gcc7     1.04GB/s ± 0%  1.03GB/s ± 0%   -0.83%  (p=0.008 n=5+5)
2019-02-03 14:57:34 +11:00
Nigel Tao d1f1340d47 Add a nothing built-in literal 2019-02-03 14:01:19 +11:00
Nigel Tao 54a112a130 Skip generating wuffs_base__utility typed fields 2019-02-02 16:47:04 +11:00
Nigel Tao dcf91f6c7e Move wuffs_base__utility__null_slice_u8 to private 2019-02-02 16:44:41 +11:00
Nigel Tao 852a979d2f Remove the cgen receiver for base.utility methods 2019-02-02 16:43:07 +11:00
Nigel Tao 5f7c807729 Generate macros for public scalar consts 2019-02-02 16:17:10 +11:00
Nigel Tao 4af1b88ef8 Make cgen's public constants' always static 2019-02-02 16:02:38 +11:00
Nigel Tao 022d221266 Tweak cgen's constants' format 2019-02-02 15:55:25 +11:00
Nigel Tao be2d96bb27 Add public max_incl_workbuf_len constants 2019-02-02 15:51:04 +11:00
Nigel Tao c9830ceb9a Add a workbuf argument to decode_io_writer 2019-02-02 15:35:05 +11:00
Nigel Tao 91f7f4b70a Avoid -Wunused-function warnings with clang 2019-02-02 14:15:52 +11:00
Nigel Tao 70958ea914 Avoid "defined but not used" for consts 2019-02-02 13:34:50 +11:00
Nigel Tao 8bbdcc4ce1 Allow scalar constants in type expressions 2019-02-02 07:53:59 +11:00
Nigel Tao 65c2f4971f Rename some initialize methods to prepare or set 2019-01-26 15:46:42 +11:00
Nigel Tao ecccafab09 Add check for interleaved coroutines
It's not an optimization per se, but it seems to help:

name                                             old speed      new speed      delta

wuffs_deflate_decode_1k/clang5                    138MB/s ± 1%   150MB/s ± 1%   +8.96%  (p=0.008 n=5+5)
wuffs_deflate_decode_10k/clang5                   223MB/s ± 0%   243MB/s ± 0%   +9.25%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_just_one_read/clang5    263MB/s ± 2%   289MB/s ± 0%  +10.19%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/clang5   220MB/s ± 1%   243MB/s ± 0%  +10.42%  (p=0.008 n=5+5)

wuffs_deflate_decode_1k/gcc7                      158MB/s ± 0%   157MB/s ± 0%     ~     (p=0.056 n=5+5)
wuffs_deflate_decode_10k/gcc7                     268MB/s ± 0%   268MB/s ± 0%     ~     (p=1.000 n=5+5)
wuffs_deflate_decode_100k_just_one_read/gcc7      312MB/s ± 0%   320MB/s ± 0%   +2.62%  (p=0.008 n=5+5)
wuffs_deflate_decode_100k_many_big_reads/gcc7     254MB/s ± 0%   253MB/s ± 0%   -0.48%  (p=0.016 n=5+5)
2019-01-26 15:33:43 +11:00
Nigel Tao 89fef4cf5f Align cgen's private_impl.placeholder 2019-01-26 09:28:50 +11:00
Nigel Tao dec519d9b4 Remove image_config.workbuf_len 2019-01-19 14:49:27 +11:00
Nigel Tao 989c611711 Allow C++ methods even when !WUFFS_IMPLEMENTATION
Also disallow copy and assign.
2019-01-19 14:38:19 +11:00