mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 08:47:28 +01:00
Have std/png check CRC-32 checksums
wuffs_png_decode_19k_8bpp/clang9 90.3MB/s ± 0% 89.0MB/s ± 0% -1.49% (p=0.008 n=5+5) wuffs_png_decode_40k_24bpp/clang9 128MB/s ± 0% 126MB/s ± 0% -1.42% (p=0.008 n=5+5) wuffs_png_decode_77k_8bpp/clang9 340MB/s ± 0% 333MB/s ± 0% -1.81% (p=0.008 n=5+5) wuffs_png_decode_552k_32bpp/clang9 256MB/s ± 0% 253MB/s ± 0% -1.06% (p=0.008 n=5+5) wuffs_png_decode_4002k_24bpp/clang9 128MB/s ± 0% 126MB/s ± 0% -1.77% (p=0.008 n=5+5) wuffs_png_decode_19k_8bpp/gcc10 97.7MB/s ± 0% 95.2MB/s ± 0% -2.52% (p=0.008 n=5+5) wuffs_png_decode_40k_24bpp/gcc10 136MB/s ± 3% 129MB/s ± 0% -5.13% (p=0.008 n=5+5) wuffs_png_decode_77k_8bpp/gcc10 362MB/s ± 1% 353MB/s ± 1% -2.52% (p=0.008 n=5+5) wuffs_png_decode_552k_32bpp/gcc10 273MB/s ± 0% 271MB/s ± 0% -0.54% (p=0.008 n=5+5) wuffs_png_decode_4002k_24bpp/gcc10 136MB/s ± 0% 130MB/s ± 0% -4.45% (p=0.008 n=5+5)
This commit is contained in:
1 parent
909b933695
commit
04ab103809
5 files changed
+853
-316
No files matched your search
@@ -24,13 +24,23 @@ wuffs_base__io__count_since(uint64_t mark, uint64_t index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO: drop the "const" in "const uint8_t* ptr". Some though required about
|
||||
// the base.io_reader.since method returning a mutable "slice base.u8".
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
#endif
|
||||
static inline wuffs_base__slice_u8 //
|
||||
wuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) {
|
||||
wuffs_base__io__since(uint64_t mark, uint64_t index, const uint8_t* ptr) {
|
||||
if (index >= mark) {
|
||||
return wuffs_base__make_slice_u8(ptr + mark, ((size_t)(index - mark)));
|
||||
return wuffs_base__make_slice_u8(((uint8_t*)ptr) + mark,
|
||||
((size_t)(index - mark)));
|
||||
}
|
||||
return wuffs_base__make_slice_u8(NULL, 0);
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
// --------
|
||||
|
||||
|
||||
Reference in new issue
Block a user