Expand description
Cryptographic hash functions with CPU feature detection and optimizations
Provides optimized SHA256 implementations that automatically select the best available implementation based on CPU features:
- AVX2 SIMD (8-way parallel) - fastest on modern CPUs
- SSE4 SIMD (4-way parallel) - fallback for older CPUs
- Generic (sha2 crate with asm) - baseline for all CPUs
The sha2 crate with “asm” feature already includes optimized assembly, but we can add batch processing and CPU feature detection for better performance in batch scenarios.
Modules§
- avx2_
batch - AVX2-optimized batch SHA256 hashing
- cpu_
features - CPU feature detection for runtime optimization selection
- hash_
compare - SIMD-optimized hash comparison utilities
- int_ops
- Optimized integer arithmetic operations for hot paths
- sha256_
avx2 - AVX2-optimized SHA256 implementation
- sha_ni
- Intel SHA Extensions (SHA-NI) optimized SHA256
- simd_
bytes - SIMD-optimized byte array operations
Structs§
- Optimized
Sha256 - Optimized SHA256 hasher with CPU feature detection