Commit Graph
270 Commits
Author SHA1 Message Date
Nigel Tao 65b0b59529 Have hermeticity.md mention thread-local storage 2020-08-28 09:05:52 +10:00
Nigel Tao 6069ebd619 Rename {read,writ}er_io_position 2020-08-27 23:32:53 +10:00
Nigel Tao 378ceb2537 Add bullet points to doc/note/hermeticity.md 2020-08-26 15:48:32 +10:00
Nigel Tao 525d4bcc34 Add hexadecimal limits to doc/note/base38-etc 2020-08-24 00:45:42 +10:00
Nigel Tao 592560e0f1 Upgrade default clang C compiler from v5 to v9 2020-08-21 14:18:26 +10:00
Nigel Tao e2398d580f Add doc/note/hermeticity.md 2020-08-16 23:40:50 +10:00
Nigel Tao be8542e313 Rename I/O available methods to length 2020-08-13 23:26:08 +10:00
Nigel Tao 0b7eaf291b Add example/cbor-to-json 2020-08-09 23:03:42 +10:00
Nigel Tao 9dd8c32683 Re-do doc/note/tokens.md's pjtdf example output 2020-08-07 13:18:53 +10:00
Nigel Tao d7e0133c0b Tweak doc/note/auxiliary-code.md 2020-08-06 09:32:17 +10:00
Nigel Tao 724ce98540 Update some refs to the old aux directory name 2020-08-06 09:17:54 +10:00
Nigel Tao cf8884d44c Rename example/library to example/toy-genlib 2020-08-05 11:55:51 +10:00
Nigel Tao f557dad608 Add example/json-to-cbor 2020-08-04 23:45:46 +10:00
Nigel Tao cf6c578973 Add aux library 2020-08-04 23:43:38 +10:00
Nigel Tao e511b8b891 Fix doc/note/tokens.md bit assignment chart 2020-07-21 23:22:10 +10:00
Nigel Tao 4e193599ac Add std/cbor 2020-07-15 14:08:37 +10:00
Nigel Tao f89d2ef4ab Update doc/note/auto-formatting.md comparison link 2020-06-10 22:43:51 +10:00
Nigel Tao 1dae694e00 Update doc/note/auto-formatting.md comparison link 2020-06-09 15:59:46 +10:00
Nigel Tao 983c5cd90e Update doc/note/auto-formatting.md comparison link 2020-06-08 23:29:52 +10:00
Nigel Tao e42d126667 Update doc/note/auto-formatting.md comparison link 2020-06-07 22:02:07 +10:00
Nigel Tao 60cd231e65 Update doc/note/auto-formatting.md comparison link 2020-06-06 22:45:57 +10:00
Nigel Tao f45f01f4f3 Update clang-format from v5 to v9 2020-06-05 14:06:56 +10:00
Nigel Tao 78daf1ca91 Update doc/note/auto-formatting.md for dumbindent 2020-06-05 10:59:27 +10:00
Nigel Tao a0f7059eeb Tweak changelog bullet for C formatting 2020-06-05 10:46:42 +10:00
Nigel Tao 8cd39fc1dd Remove -cformatter flag 2020-06-05 00:08:05 +10:00
Nigel Tao 12b0f4c0bc Change the default -cformatter to dumbindent
A follow-up commit will remove the -cformatter flag entirely.

Formatting the generated C code is now a small fraction of where "wuffs
gen" spends its time.

----
$ # Before.
$ time wuffs gen > /dev/null
real	0m0.932s
user	0m0.837s
sys	0m0.187s

$ # After.
$ time wuffs gen > /dev/null
real	0m0.186s
user	0m0.170s
sys	0m0.069s

$ time wuffs gen -cformatter= > /dev/null
real	0m0.184s
user	0m0.170s
sys	0m0.059s
----
2020-06-04 23:59:20 +10:00
Nigel Tao 829519880a Drop unnecessary memcpy in do_bench_image_decode
This doesn't affect the std/bmp or std/gif implementations per se, only
the code that benches them. Prior to this commit, the source file was
first decoded into a pixel buffer and then always copied from the
(2-dimensional) wuffs_base__pixel_buffer to a (1-dimensional)
wuffs_base_io_buffer. That copy is useful for *tests*, which compare
that io_buffer's contents to a known good result (i.e. a separate I/O
buffer filled with the contents of a golden file), but it isn't
necessary for *benches*. Dropping that unnecessary copy reduces the
total time per iteration, and therefore increases the reported speed.

name                                        old speed      new speed       delta

wuffs_bmp_decode_40k/clang5                 2.09GB/s ± 2%   2.48GB/s ± 0%  +18.78%  (p=0.008 n=5+5)

wuffs_bmp_decode_40k/gcc7                   1.73GB/s ± 1%   1.93GB/s ± 0%  +11.54%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/clang5                291MB/s ± 0%    376MB/s ± 1%  +29.14%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_full_init/clang5  95.3MB/s ± 1%  103.2MB/s ± 1%   +8.37%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/clang5   117MB/s ± 0%    130MB/s ± 0%  +10.68%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/clang5             469MB/s ± 0%    489MB/s ± 1%   +4.39%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_indexed/clang5          126MB/s ± 1%    130MB/s ± 1%   +3.50%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/clang5                  152MB/s ± 0%    156MB/s ± 1%   +2.77%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/clang5      318MB/s ± 0%    329MB/s ± 0%   +3.53%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/clang5       137MB/s ± 0%    139MB/s ± 0%   +1.40%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/clang5      138MB/s ± 0%    140MB/s ± 1%   +1.45%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/clang5      139MB/s ± 0%    140MB/s ± 1%   +1.03%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/clang5       661MB/s ± 0%    747MB/s ± 1%  +13.08%  (p=0.008 n=5+5)

mimic_gif_decode_1k_bw/clang5               92.0MB/s ± 0%   91.9MB/s ± 1%     ~     (p=0.841 n=5+5)
mimic_gif_decode_1k_color/clang5            45.5MB/s ± 0%   45.7MB/s ± 0%   +0.45%  (p=0.032 n=5+4)
mimic_gif_decode_10k_indexed/clang5         53.5MB/s ± 0%   53.7MB/s ± 0%   +0.31%  (p=0.032 n=5+4)
mimic_gif_decode_20k/clang5                 55.5MB/s ± 0%   55.1MB/s ± 2%     ~     (p=0.690 n=5+5)
mimic_gif_decode_100k_artificial/clang5     88.8MB/s ± 0%   89.0MB/s ± 1%     ~     (p=0.151 n=5+5)
mimic_gif_decode_100k_realistic/clang5      53.5MB/s ± 1%   53.7MB/s ± 0%   +0.31%  (p=0.024 n=5+5)
mimic_gif_decode_1000k/clang5               54.6MB/s ± 0%   54.6MB/s ± 1%     ~     (p=0.222 n=5+5)
mimic_gif_decode_anim_screencap/clang5       106MB/s ± 0%    109MB/s ± 0%   +2.59%  (p=0.008 n=5+5)

wuffs_gif_decode_1k_bw/gcc7                  284MB/s ± 0%    356MB/s ± 0%  +25.33%  (p=0.016 n=4+5)
wuffs_gif_decode_1k_color_full_init/gcc7    82.1MB/s ± 0%   95.3MB/s ± 0%  +16.08%  (p=0.008 n=5+5)
wuffs_gif_decode_1k_color_part_init/gcc7    97.5MB/s ± 0%  117.4MB/s ± 0%  +20.39%  (p=0.008 n=5+5)
wuffs_gif_decode_10k_bgra/gcc7               345MB/s ± 0%    396MB/s ± 0%  +14.71%  (p=0.016 n=4+5)
wuffs_gif_decode_10k_indexed/gcc7            104MB/s ± 0%    121MB/s ± 0%  +16.38%  (p=0.008 n=5+5)
wuffs_gif_decode_20k/gcc7                    131MB/s ± 0%    149MB/s ± 0%  +13.55%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_artificial/gcc7        293MB/s ± 0%    321MB/s ± 1%   +9.77%  (p=0.008 n=5+5)
wuffs_gif_decode_100k_realistic/gcc7         116MB/s ± 1%    130MB/s ± 1%  +12.10%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_full_init/gcc7        117MB/s ± 1%    132MB/s ± 1%  +12.53%  (p=0.008 n=5+5)
wuffs_gif_decode_1000k_part_init/gcc7        117MB/s ± 0%    132MB/s ± 1%  +12.20%  (p=0.008 n=5+5)
wuffs_gif_decode_anim_screencap/gcc7         615MB/s ± 2%    711MB/s ± 2%  +15.53%  (p=0.008 n=5+5)

mimic_gif_decode_1k_bw/gcc7                 91.4MB/s ± 0%   91.7MB/s ± 1%     ~     (p=0.095 n=5+5)
mimic_gif_decode_1k_color/gcc7              46.3MB/s ± 0%   46.2MB/s ± 2%     ~     (p=0.841 n=5+5)
mimic_gif_decode_10k_indexed/gcc7           51.9MB/s ± 1%   51.7MB/s ± 1%     ~     (p=0.310 n=5+5)
mimic_gif_decode_20k/gcc7                   54.2MB/s ± 0%   54.2MB/s ± 1%     ~     (p=0.421 n=5+5)
mimic_gif_decode_100k_artificial/gcc7       88.4MB/s ± 1%   88.7MB/s ± 1%     ~     (p=0.222 n=5+5)
mimic_gif_decode_100k_realistic/gcc7        53.7MB/s ± 0%   53.7MB/s ± 0%     ~     (p=0.206 n=5+5)
mimic_gif_decode_1000k/gcc7                 53.8MB/s ± 2%   54.0MB/s ± 2%     ~     (p=0.690 n=5+5)
mimic_gif_decode_anim_screencap/gcc7         106MB/s ± 0%    109MB/s ± 0%   +2.79%  (p=0.008 n=5+5)
2020-06-01 13:59:50 +10:00
Nigel Tao 54196c4e80 Rename pixel_swizzler.swizzle_interleaved 2020-05-29 16:54:05 +10:00
Nigel Tao 092b03cd1e Add WUFFS_CONFIG__MODULE__BASE__ETC sub-modules
$ ls -l gen/lib/c/*/{lib*,*base*} | awk '{print $5 " " $9}'

Before:
167976 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 40824 gen/lib/c/clang-5.0-dynamic/wuffs-base.lo
203306 gen/lib/c/clang-5.0-static/libwuffs.a
 41816 gen/lib/c/clang-5.0-static/wuffs-base.o
188080 gen/lib/c/gcc-dynamic/libwuffs.so
 53976 gen/lib/c/gcc-dynamic/wuffs-base.lo
230002 gen/lib/c/gcc-static/libwuffs.a
 53976 gen/lib/c/gcc-static/wuffs-base.o

After:
168024 gen/lib/c/clang-5.0-dynamic/libwuffs.so
 20664 gen/lib/c/clang-5.0-dynamic/wuffs-base-core.lo
 10784 gen/lib/c/clang-5.0-dynamic/wuffs-base-f64conv.lo
 11640 gen/lib/c/clang-5.0-dynamic/wuffs-base-pixconv.lo
205752 gen/lib/c/clang-5.0-static/libwuffs.a
 20960 gen/lib/c/clang-5.0-static/wuffs-base-core.o
 11024 gen/lib/c/clang-5.0-static/wuffs-base-f64conv.o
 12096 gen/lib/c/clang-5.0-static/wuffs-base-pixconv.o
188128 gen/lib/c/gcc-dynamic/libwuffs.so
 18936 gen/lib/c/gcc-dynamic/wuffs-base-core.lo
 10672 gen/lib/c/gcc-dynamic/wuffs-base-f64conv.lo
 27232 gen/lib/c/gcc-dynamic/wuffs-base-pixconv.lo
232984 gen/lib/c/gcc-static/libwuffs.a
 18920 gen/lib/c/gcc-static/wuffs-base-core.o
 10640 gen/lib/c/gcc-static/wuffs-base-f64conv.o
 27216 gen/lib/c/gcc-static/wuffs-base-pixconv.o
2020-05-25 23:01:11 +10:00
Nigel Tao ee60af58fb Add NIE spec note re degenerate animations 2020-05-21 21:42:02 +10:00
Nigel Tao 9a1b8def46 Tweak pixel_format bits 2020-05-16 10:12:16 +10:00
Nigel Tao 2c643aa704 Add example/convert-to-nia 2020-05-14 21:44:03 +10:00
Nigel Tao f602237490 Tweak NIA/NIA duration wire format
Durations now take 63 bits, not 62, which matches the bit depth of a
non-negative int64_t.

Frame durations now come before, not after, the frame pixels.
2020-05-14 21:11:08 +10:00
Nigel Tao ad1cff3921 Add tell_me_more? mechanism 2020-05-12 11:12:39 +10:00
Nigel Tao 532e18c4a5 Add colons to const syntax 2020-04-14 14:57:30 +10:00
Nigel Tao 873c6b400a Add alloc functions 2020-04-12 20:34:33 +10:00
Nigel Tao 492ee61391 Add doc/note link from base38-etc.md to tokens.md 2020-04-10 22:00:04 +10:00
Nigel Tao 335819f90e Fix some doc/note/tokens.md typos 2020-04-10 21:24:43 +10:00
Nigel Tao 6612d90ca2 Re-write bit ranges in the docs 2020-04-09 22:29:45 +10:00
Nigel Tao 496e88b6c5 Remove wuffs_base__token__link_prev 2020-04-09 22:11:08 +10:00
Nigel Tao 478d1b817c Add doc/note/tokens.md 2020-04-08 23:31:18 +10:00
Nigel Tao 3fe3f84106 Add double-curly blocks 2020-04-02 21:56:53 +11:00
Nigel Tao 9e50918718 Add single-quoted strings 2020-03-25 19:41:02 +11:00
Nigel Tao c5c10e95b7 Remove some superfluous empty // comments 2020-03-18 21:58:19 +11:00
Nigel Tao 07d99dc2e1 Update some RFC links 2020-03-12 16:58:38 +11:00
Nigel Tao a3827275c0 Add std/json quirks 2020-03-12 16:47:26 +11:00
Nigel Tao 809220e6cc Add wuffs_base__utf_8__next 2020-02-27 14:41:45 +11:00
Nigel Tao 2fa96fc469 Fix doc/note/auto-formatting.md typo 2020-02-26 22:47:55 +11:00
Nigel Tao b319639bad Add doc/note/auto-formatting.md 2020-02-26 10:18:08 +11:00
Nigel Tao b1e3a15c08 Add endwhile syntax 2020-02-22 13:11:02 +11:00