Expand description
SIMD Vectorization: Batch hash operations
Provides batch hash processing for parallel hash operations. Leverages existing SIMD in sha2 crate (asm feature) + Rayon for CPU-core parallelization.
Provides batch functions for:
- SHA256 and double SHA256 (Bitcoin standard)
- RIPEMD160 and HASH160 (OP_HASH160)
Uses chunked processing for better cache locality and parallelizes across CPU cores when batch size is large enough (≥8 items).
Reference: BLVM Optimization Pass 5 - SIMD Vectorization
Functions§
- batch_
double_ sha256 - Batch double SHA256: Compute SHA256(SHA256(x)) for multiple inputs
- batch_
double_ sha256_ aligned - Batch double SHA256 with cache-aligned output
- batch_
hash160 - Batch HASH160: Compute RIPEMD160(SHA256(x)) for multiple inputs
- batch_
ripemd160 - Batch RIPEMD160: Compute RIPEMD160 for multiple inputs
- batch_
sha256 - Batch SHA256: Compute SHA256 for multiple independent inputs