mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 00:38:14 +01:00
Some of the benchmark numbers move around even though they don't use the new etc__convert_rgbx_x86_avx2 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 372MB/s ± 0% 370MB/s ± 0% -0.64% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/clang11 278MB/s ± 0% 295MB/s ± 0% +5.89% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/clang11 710MB/s ± 0% 726MB/s ± 0% +2.30% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/clang11 603MB/s ± 0% 622MB/s ± 0% +3.12% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/clang11 635MB/s ± 0% 659MB/s ± 0% +3.82% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/clang11 650MB/s ± 0% 649MB/s ± 0% -0.17% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/clang11 629MB/s ± 0% 675MB/s ± 0% +7.20% (p=0.008 n=5+5) wuffs_jpeg_decode_19k_8bpp/gcc10 364MB/s ± 0% 351MB/s ± 0% -3.62% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/gcc10 334MB/s ± 0% 334MB/s ± 0% -0.06% (p=0.032 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/gcc10 944MB/s ± 0% 924MB/s ± 0% -2.19% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/gcc10 769MB/s ± 0% 740MB/s ± 0% -3.75% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/gcc10 842MB/s ± 0% 812MB/s ± 0% -3.60% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/gcc10 661MB/s ± 0% 647MB/s ± 0% -2.13% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/gcc10 849MB/s ± 0% 817MB/s ± 0% -3.77% (p=0.016 n=5+4)
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
basepackage 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
basetypes, 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 ofbaseto be understd, but anybaseAPI 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.