mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 00:47:56 +01:00
Add crc32.ieee_hasher.up_x86_avx2
name old speed new speed delta wuffs_crc32_ieee_10k/clang9 8.42GB/s ± 1% 8.12GB/s ± 1% -3.55% (p=0.000 n=9+8) wuffs_crc32_ieee_100k/clang9 11.0GB/s ± 1% 10.9GB/s ± 1% ~ (p=0.931 n=9+9) wuffs_crc32_ieee_10k/gcc10 9.20GB/s ± 0% 9.71GB/s ± 0% +5.54% (p=0.000 n=8+10) wuffs_crc32_ieee_100k/gcc10 11.9GB/s ± 2% 13.1GB/s ± 1% +10.22% (p=0.000 n=10+8) wuffs_gzip_decode_10k/clang9 219MB/s ± 1% 218MB/s ± 2% ~ (p=0.497 n=9+10) wuffs_gzip_decode_100k/clang9 283MB/s ± 2% 281MB/s ± 1% ~ (p=0.063 n=10+10) wuffs_gzip_decode_10k/gcc10 224MB/s ± 1% 223MB/s ± 1% ~ (p=0.489 n=9+9) wuffs_gzip_decode_100k/gcc10 285MB/s ± 4% 290MB/s ± 0% +1.68% (p=0.004 n=10+8) wuffs_png_decode_image_19k_8bpp/clang9 138MB/s ± 2% 138MB/s ± 1% ~ (p=0.156 n=10+9) wuffs_png_decode_image_40k_24bpp/clang9 171MB/s ± 2% 172MB/s ± 1% ~ (p=0.971 n=10+10) wuffs_png_decode_image_77k_8bpp/clang9 495MB/s ± 4% 504MB/s ± 1% +1.79% (p=0.000 n=9+9) wuffs_png_decode_image_552k_32bpp_ignore_checksum/clang9 457MB/s ± 4% 463MB/s ± 0% +1.35% (p=0.002 n=9+9) wuffs_png_decode_image_552k_32bpp_verify_checksum/clang9 435MB/s ± 5% 445MB/s ± 1% +2.31% (p=0.000 n=10+9) wuffs_png_decode_image_4002k_24bpp/clang9 172MB/s ± 2% 174MB/s ± 1% ~ (p=0.053 n=10+9) wuffs_png_decode_image_19k_8bpp/gcc10 157MB/s ± 1% 157MB/s ± 1% ~ (p=0.549 n=9+10) wuffs_png_decode_image_40k_24bpp/gcc10 187MB/s ± 1% 186MB/s ± 1% ~ (p=0.182 n=10+9) wuffs_png_decode_image_77k_8bpp/gcc10 554MB/s ± 1% 559MB/s ± 0% +0.84% (p=0.000 n=9+9) wuffs_png_decode_image_552k_32bpp_ignore_checksum/gcc10 502MB/s ± 1% 500MB/s ± 0% -0.38% (p=0.011 n=10+10) wuffs_png_decode_image_552k_32bpp_verify_checksum/gcc10 481MB/s ± 1% 478MB/s ± 0% -0.46% (p=0.002 n=8+9) wuffs_png_decode_image_4002k_24bpp/gcc10 189MB/s ± 2% 190MB/s ± 0% +0.62% (p=0.008 n=10+9)
This commit is contained in:
1 parent
1dd7ad4413
commit
2dddd388bc
7 files changed
+333
-3
No files matched your search
@@ -148,6 +148,33 @@ wuffs_base__cpu_arch__have_arm_neon() {
|
||||
#endif // defined(WUFFS_BASE__CPU_ARCH__ARM_NEON)
|
||||
}
|
||||
|
||||
static inline bool //
|
||||
wuffs_base__cpu_arch__have_x86_avx2() {
|
||||
#if defined(WUFFS_BASE__CPU_ARCH__X86_64)
|
||||
// GCC defines these macros but MSVC does not.
|
||||
// - bit_BMI2 = (1 << 5)
|
||||
const unsigned int avx2_ebx7 = 0x00000020;
|
||||
|
||||
// clang defines __GNUC__ and clang-cl defines _MSC_VER (but not __GNUC__).
|
||||
#if defined(__GNUC__)
|
||||
unsigned int eax7 = 0;
|
||||
unsigned int ebx7 = 0;
|
||||
unsigned int ecx7 = 0;
|
||||
unsigned int edx7 = 0;
|
||||
if (__get_cpuid_count(7, 0, &eax7, &ebx7, &ecx7, &edx7)) {
|
||||
return (ebx7 & avx2_ebx7) == avx2_ebx7;
|
||||
}
|
||||
#elif defined(_MSC_VER) // defined(__GNUC__)
|
||||
int x[4];
|
||||
__cpuidex(x, 7, 0);
|
||||
return (((unsigned int)(x[1])) & avx2_ebx7) == avx2_ebx7;
|
||||
#else
|
||||
#error "WUFFS_BASE__CPU_ARCH__ETC combined with an unsupported compiler"
|
||||
#endif // defined(__GNUC__); defined(_MSC_VER)
|
||||
#endif // defined(WUFFS_BASE__CPU_ARCH__X86_64)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool //
|
||||
wuffs_base__cpu_arch__have_x86_bmi2() {
|
||||
#if defined(WUFFS_BASE__CPU_ARCH__X86_64)
|
||||
|
||||
Reference in new issue
Block a user