Commit Graph
245 Commits
Author SHA1 Message Date
Nigel Tao f155db4d5c cgen: emit "break/continue" not "goto", part 1
name                                             old speed     new speed     delta

wuffs_jpeg_decode_19k_8bpp/clang11               229MB/s ± 0%  241MB/s ± 0%  +5.29%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang11  205MB/s ± 0%  213MB/s ± 0%  +3.89%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang11   375MB/s ± 0%  386MB/s ± 0%  +3.01%  (p=0.008 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang11              326MB/s ± 0%  341MB/s ± 0%  +4.80%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang11         339MB/s ± 0%  356MB/s ± 0%  +5.14%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang11         475MB/s ± 0%  484MB/s ± 0%  +2.04%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang11            343MB/s ± 0%  362MB/s ± 0%  +5.77%  (p=0.008 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc10                 245MB/s ± 0%  245MB/s ± 0%  -0.07%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10    254MB/s ± 0%  252MB/s ± 0%  -0.52%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc10     514MB/s ± 0%  513MB/s ± 0%    ~     (p=0.151 n=5+5)
wuffs_jpeg_decode_77k_24bpp/gcc10                434MB/s ± 0%  433MB/s ± 0%  -0.35%  (p=0.016 n=5+4)
wuffs_jpeg_decode_552k_24bpp_420/gcc10           459MB/s ± 0%  458MB/s ± 0%  -0.12%  (p=0.016 n=5+4)
wuffs_jpeg_decode_552k_24bpp_444/gcc10           486MB/s ± 0%  486MB/s ± 0%  -0.03%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc10              467MB/s ± 0%  465MB/s ± 0%  -0.26%  (p=0.016 n=5+4)
2023-06-23 17:46:40 +10:00
Nigel Tao 8916f1b6ea lang: add if.likely and if.unlikely 2023-06-20 18:00:48 +10:00
Nigel Tao 66723c6706 lang: make this.foo read-only in a pure function 2023-06-13 22:38:29 +10:00
Nigel Tao 19f56ebfd2 lang: allow "slice_var as ptr array[etc] etc" 2023-06-13 22:38:25 +10:00
Nigel Tao 8ac22ceab2 cgen: allow "var x : nptr array[etc] etc" 2023-06-13 10:49:37 +10:00
Nigel Tao 2f18dc61d0 std/jpeg: call slice.bulk_memset 2023-06-04 21:22:14 +10:00
Nigel Tao cac4df3bde std/tga: re-type a field from slice to roslice 2023-05-06 10:03:15 +10:00
Nigel Tao f3caf09d77 lang: add read-only type decorators 2023-04-10 15:29:12 +10:00
Nigel Tao be1f605108 Run gofmt 2022-08-21 21:41:06 +10:00
Nigel Tao 07c053af6f Have reset! LEAVE_INTERNAL_BUFFERS_UNINITIALIZED 2021-11-16 13:16:43 +11:00
Nigel Tao f73f95b698 Rename from ast.IOBind to ast.IOManip 2021-08-15 08:40:05 +10:00
Nigel Tao 28a54baa19 Add io_bind history_position arg 2021-08-15 08:36:14 +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 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 492068f3dc Prepare to add cpu_arch_utility types 2021-02-18 16:16:48 +11:00
Nigel Tao 3338b5eafa Add arm_crc32,arm_neon cpu_arch conditions 2021-02-13 17:01:09 +11:00
Nigel Tao 5941e7e5cc Rename sse128/sse128i to x86_sse42/x86_m128i 2021-01-24 21:58:00 +11:00
Nigel Tao d1b741338b Add sse128_i.load_slice128 2021-01-23 22:58:21 +11:00
Nigel Tao 602b711ba6 Fix lang/ast test for non-numeric refinements 2021-01-17 22:47:01 +11:00
Nigel Tao 020b8e6903 Add cpu_arch 2021-01-15 10:26:55 +11:00
Nigel Tao a1a70da539 Add iterate advance parameter 2021-01-11 00:03:44 +11:00
Nigel Tao beaf3ef11f Add choose
wuffs_png_decode_filter_1_sub/clang9       905MB/s ± 0%  1339MB/s ± 0%  +48.05%  (p=0.008 n=5+5)
wuffs_png_decode_filter_1_sub/gcc10       1.12GB/s ± 0%  1.85GB/s ± 0%  +64.80%  (p=0.016 n=5+4)
2021-01-06 23:16:16 +11:00
Nigel Tao 81c6437e09 Add choosy 2021-01-04 23:20:41 +11:00
Nigel Tao b7b39e34d8 Add more facts after "x = y.max(a: z)"
wuffs_png_decode_19k_8bpp/clang9          95.8MB/s ± 1%  95.7MB/s ± 1%     ~     (p=0.310 n=5+5)
wuffs_png_decode_40k_24bpp/clang9          112MB/s ± 0%   112MB/s ± 0%   +0.16%  (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/clang9           358MB/s ± 0%   357MB/s ± 0%     ~     (p=0.905 n=4+5)
wuffs_png_decode_552k_32bpp/clang9         143MB/s ± 0%   119MB/s ± 1%  -17.27%  (p=0.008 n=5+5)
wuffs_png_decode_4002k_24bpp/clang9        114MB/s ± 0%   114MB/s ± 0%   +0.42%  (p=0.008 n=5+5)

wuffs_png_decode_filter_1_sub/clang9      1.02GB/s ± 0%  0.92GB/s ± 1%   -9.75%  (p=0.008 n=5+5)
wuffs_png_decode_filter_2_up/clang9       13.5GB/s ± 0%  13.3GB/s ± 1%   -1.25%  (p=0.008 n=5+5)
wuffs_png_decode_filter_3_average/clang9   491MB/s ± 0%   554MB/s ± 0%  +12.72%  (p=0.008 n=5+5)
wuffs_png_decode_filter_4_paeth/clang9    75.5MB/s ± 0%  61.9MB/s ± 1%  -17.95%  (p=0.008 n=5+5)

wuffs_png_decode_19k_8bpp/gcc10           99.4MB/s ± 0%  99.9MB/s ± 1%   +0.51%  (p=0.032 n=5+5)
wuffs_png_decode_40k_24bpp/gcc10           116MB/s ± 0%   114MB/s ± 0%   -2.27%  (p=0.008 n=5+5)
wuffs_png_decode_77k_8bpp/gcc10            321MB/s ± 0%   325MB/s ± 0%   +1.32%  (p=0.016 n=5+4)
wuffs_png_decode_552k_32bpp/gcc10          159MB/s ± 0%   160MB/s ± 0%     ~     (p=0.190 n=5+4)
wuffs_png_decode_4002k_24bpp/gcc10         117MB/s ± 0%   117MB/s ± 0%     ~     (p=0.310 n=5+5)

wuffs_png_decode_filter_1_sub/gcc10       1.12GB/s ± 0%  0.98GB/s ± 0%  -12.54%  (p=0.008 n=5+5)
wuffs_png_decode_filter_2_up/gcc10        11.3GB/s ± 0%  11.5GB/s ± 1%   +2.08%  (p=0.016 n=4+5)
wuffs_png_decode_filter_3_average/gcc10    644MB/s ± 0%   644MB/s ± 0%     ~     (p=0.151 n=5+5)
wuffs_png_decode_filter_4_paeth/gcc10     83.8MB/s ± 0%  84.3MB/s ± 1%     ~     (p=0.095 n=5+5)
2021-01-02 22:35:54 +11:00
Nigel Tao f6d11c78da Add ast.Expr IsArgsDotFoo and IsMethodCall methods 2020-12-23 15:13:14 +11:00
Nigel Tao 43630d14f0 Make lang/ast Str methods return non-empty for nil 2020-11-09 21:39:50 +11:00
Nigel Tao ed48514f30 Remove ast.NewExpr statusPkg arg 2020-06-10 12:05:48 +10:00
Nigel Tao 6f43ab4b92 Reject duplicate top level names 2020-06-09 16:59:43 +10:00
Nigel Tao e5c86ec191 Let an unbroken "while true" terminate a block 2020-04-03 10:46:05 +11:00
Nigel Tao 4a89913a9b Ban duplicate loop labels 2020-04-03 10:33:05 +11:00
Nigel Tao ee23f8b3d9 Move loop/jump matching from check to parse 2020-04-03 10:26:35 +11:00
Nigel Tao 4cfc367a9b Factor out an ast.Terminates function 2020-04-02 17:32:37 +11:00
Nigel Tao 40d200cdab Drop cached expr MBounds when re-checking asserts
Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21371
2020-03-26 08:14:43 +11:00
Nigel Tao 58351d44da Make endwhile mandatory for nameless loops 2020-03-25 21:40:00 +11:00
Nigel Tao 9e50918718 Add single-quoted strings 2020-03-25 19:41:02 +11:00
Nigel Tao 2d2a880c18 Ban unlabeled break/continue for labeled loop 2020-02-24 14:20:05 +11:00
Nigel Tao 21c87ce6b3 Skip writeSaveDerivedVar if func ends with return 2020-02-19 21:10:19 +11:00
Nigel Tao 737e31ff3a Add tokens 2020-02-11 12:02:58 +11:00
Nigel Tao ea54c2ea11 Add syntax support for implementing interfaces 2020-01-09 15:45:29 +11:00
Nigel Tao 8f5983f151 Tweak ast.Struct field numbering 2020-01-08 22:20:17 +11:00
Nigel Tao 4323a16707 Add interface method implementations 2020-01-06 23:24:08 +11:00
Nigel Tao cb7e9e0ce9 Add a ~mod* operator 2019-11-12 21:30:45 +11:00
Nigel Tao 1520a1f345 Rename x T to x: T for fields and func args 2019-10-12 21:49:04 +11:00
Nigel Tao 5b4e3647c0 Reformat x:y as x: y 2019-10-12 21:21:39 +11:00
Nigel Tao a9ea63ff06 Rename [i:j] to [i .. j], the same as Rust 2019-10-12 21:14:18 +11:00
Nigel Tao 7872a8893b Rename while:label to while.label 2019-10-12 19:04:32 +11:00
Nigel Tao d501daddc3 Rename [i..j] to [i ..= j], the same as Rust 2019-10-12 18:40:53 +11:00
Nigel Tao 1c1ce9b19f Drop the unused ref and deref operators 2019-10-05 12:41:09 +10:00
Nigel Tao ef7aa0d980 Rename "!=" to "<>"; "!" now only shows impurity 2019-03-02 14:51:32 +11:00