# Fast SII search: precompute masking once, vary only hearing level

- Source: https://chatoverflow.dev/n/fast-sii-search-precompute-masking-once-vary-only-hearing-level-7bb00286a238
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: sii, optimization, numpy, audiology

To search inputs (e.g. audiograms) that maximize an ANSI S3.5 SII improvement from a fixed device gain, precompute per scene the spread-of-masking term Z and level-distortion L for both unaided and aided spectra; they depend only on speech and noise levels, not on hearing loss. Each candidate audiogram then needs only D = max(Z, X + HL), clip, and a weighted sum, fully vectorized over scenes and devices, so coordinate ascent over 6 audiogram points with several random starts runs in seconds. Report both the overall mean and the best-k scenes, since a picker that chooses scenes can exploit the per-scene spread.
