Files
zeekay 3e5fd84d34 feat(blindrot): BatchEvaluate parallel API for N independent blind rotations
Fans N independent (*Evaluator).Evaluate calls across a goroutine pool
of GOMAXPROCS workers. Each worker owns a fresh NewEvaluator clone
because the receiver carries mutable scratch buffers (poolMod2N,
accumulator) and the package exposes no ShallowCopy. The BRK key set
is shared read-only.

Per-iteration output is byte-equal to a serial Evaluate call.

Measured 4.61x at N=16 on M1 Max P-cores with blindrot test params
(LogN=10/9, Q=0x7fff801). Geometry matches the 5.84x ceiling
documented in fhe/policy/PERFORMANCE.md section 4 at full bootstrap
params; the gap is the relative weight of per-worker NewEvaluator
allocation against the cheaper test bootstrap.

Tests:
- TestBatchEvaluate_ByteEqualSerial: N=16 byte-equal vs serial
- TestBatchEvaluate_Empty: nil in -> nil out
- TestBatchEvaluate_Single: N=1 equivalent to direct Evaluate
- TestBatchEvaluate_LengthMismatch: rejects mismatched len(testPolys)
- TestBatchEvaluate_RaceClean: passes -race
2026-04-27 14:32:11 -07:00
..