Expand description
IBD Hardware Tuning
Derives batch verification and parallelization parameters from hardware (CPU count, cache size). Used when config does not supply explicit overrides.
Precedence: Config override (if set) > Hardware-derived > Hardcoded default
Structs§
- IbdHardware
Profile - Hardware profile detected at first use.
Constants§
- PIPPENGER_
MIN_ CHUNK - STRAUSS_
MIN - libsecp256k1 thresholds: n<64 uses ecmult_multi_simple_var (slow), n>=64 Strauss, n>=88 Pippenger. Chunks of 64-128 use Strauss; chunks of 89+ use Pippenger.
Functions§
- chunk_
threshold_ config_ or_ hardware - Chunk threshold: single batch when n <= this. Above = split for parallelism. Precedence: config_override > env > hardware-derived > 128. Hardware-derived: many-core (16+) → 96 (more parallelism); few-core → 128.
- compute_
chunk_ ranges - Compute optimal chunk ranges for parallel batch verification. Splits n sigs into num_chunks such that each chunk has >= min_chunk sigs. min_chunk >= 1; smaller chunks use ecmult_multi_simple_var (n<64) but parallelism often wins.
- hash_
batch_ chunk_ size - Chunk size for batch hash operations (SHA256, HASH160). Cache-friendly, fits in L1. Hardware-derived from L3 when known (L3/256 clamped 8–32); otherwise 16. Used by simd_vectorization for batch hashing.
- min_
chunk_ size_ config_ or_ hardware - Min chunk size when splitting for parallelism. 128+ uses Pippenger (2-3× faster). Precedence: config_override > env > hardware-derived > 128. Hardware-derived: many-core → 64 (Strauss threshold); few-core → 128.