Files
wuffs/internal/cgen/base
Nigel Tao 8954281a4e pixconv: allow decoding to PIXEL_FORMAT__RGB
"wuffs genlib" binary size changes:
 77936 clang-static/wuffs-base-pixconv.o  # Before = 1.00x
 79792 clang-static/wuffs-base-pixconv.o  # After  = 1.02x
173784 gcc-static/wuffs-base-pixconv.o    # Before = 1.00x
177112 gcc-static/wuffs-base-pixconv.o    # After  = 1.02x

Some of the benchmark numbers move around even though they don't use the
new WUFFS_BASE__PIXEL_FORMAT__RGB code paths. It's possibly just a code
alignment coincidence per https://news.ycombinator.com/item?id=23633583

name                                                       old speed      new speed      delta

wuffs_jpeg_decode_19k_8bpp/clang11                          249MB/s ± 0%   251MB/s ± 0%   +0.76%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/clang11             222MB/s ± 0%   225MB/s ± 0%   +1.16%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/clang11              405MB/s ± 0%   406MB/s ± 0%     ~     (p=1.000 n=5+5)
wuffs_jpeg_decode_77k_24bpp/clang11                         357MB/s ± 0%   356MB/s ± 0%   -0.24%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/clang11                    370MB/s ± 0%   372MB/s ± 0%   +0.46%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/clang11                    504MB/s ± 0%   508MB/s ± 0%   +0.83%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/clang11                       375MB/s ± 0%   374MB/s ± 0%     ~     (p=0.095 n=5+5)

wuffs_jpeg_decode_19k_8bpp/gcc10                            258MB/s ± 0%   254MB/s ± 0%   -1.68%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10               267MB/s ± 0%   240MB/s ± 0%   -9.95%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_sequential/gcc10                537MB/s ± 0%   537MB/s ± 0%     ~     (p=0.556 n=4+5)
wuffs_jpeg_decode_77k_24bpp/gcc10                           458MB/s ± 0%   453MB/s ± 0%   -1.18%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_420/gcc10                      482MB/s ± 0%   478MB/s ± 0%   -0.78%  (p=0.008 n=5+5)
wuffs_jpeg_decode_552k_24bpp_444/gcc10                      508MB/s ± 0%   511MB/s ± 0%   +0.49%  (p=0.008 n=5+5)
wuffs_jpeg_decode_4002k_24bpp/gcc10                         489MB/s ± 0%   484MB/s ± 0%   -1.11%  (p=0.016 n=4+5)

wuffs_png_decode_image_19k_8bpp/clang11                     269MB/s ± 0%   275MB/s ± 0%   +2.25%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/clang11                    328MB/s ± 0%   328MB/s ± 0%     ~     (p=0.841 n=5+5)
wuffs_png_decode_image_77k_8bpp/clang11                     949MB/s ± 0%   962MB/s ± 0%   +1.29%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang11   854MB/s ± 0%   859MB/s ± 0%   +0.54%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/clang11   822MB/s ± 0%   826MB/s ± 0%   +0.52%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/clang11                  331MB/s ± 0%   332MB/s ± 0%   +0.15%  (p=0.008 n=5+5)

wuffs_png_decode_image_19k_8bpp/gcc10                       287MB/s ± 0%   277MB/s ± 0%   -3.46%  (p=0.008 n=5+5)
wuffs_png_decode_image_40k_24bpp/gcc10                      341MB/s ± 0%   346MB/s ± 0%   +1.34%  (p=0.008 n=5+5)
wuffs_png_decode_image_77k_8bpp/gcc10                      1.02GB/s ± 0%  1.01GB/s ± 0%   -0.41%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10     939MB/s ± 0%   916MB/s ± 0%   -2.50%  (p=0.008 n=5+5)
wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10     895MB/s ± 0%   874MB/s ± 0%   -2.41%  (p=0.008 n=5+5)
wuffs_png_decode_image_4002k_24bpp/gcc10                    352MB/s ± 0%   350MB/s ± 0%   -0.44%  (p=0.008 n=5+5)

Updates #131
2023-07-16 11:17:45 +10:00
..
2023-04-09 16:12:49 +10:00
2023-05-16 16:29:58 +10:00
2023-04-09 16:12:49 +10:00
2021-09-04 15:54:31 +10:00

C Base Code

This directory (base) and its sibling (auxiliary) contain C and C++ code respectively. This C/C++ code combines with the transpiled-to-C/C++ form of the Wuffs code in the top-level std directory to create the "single file C/C++ library" form of the Wuffs standard library.

  • From Wuffs-the-language's point of view, this directory contains implementations of the built-in base package types, such as I/O buffers, ranges and rects and statuses.
  • From application code's point of view (Wuffs is for writing libraries not applications), this directory also contains helper functions for working with those base types, such as constructing an I/O buffer from a pointer and a length, that aren't relevant to Wuffs-the-language code.
  • This directory also contains some functionality (e.g. pixel conversion and string conversion) that, in the future, could possibly be Wuffs packages under std. For optimal performance, they sometimes require programming language features (e.g. function-pointer typed variables, SIMD acceleration) that are not yet available in Wuffs-the-language (or were not available at the time they were added). In the short term, it was more practical to implement them in carefully hand-written C/C++, in this directory. In the long term, they could migrate out of base to be under std, but any base API removal would require a Wuffs version number bump.

Making Changes

After editing source code in this directory, to see those changes when generating the C/C++ form of Wuffs' standard library:

go install github.com/google/wuffs/cmd/wuffs-c && wuffs gen base

This should modify the wuffs-unsupported-snapshot.c file.