Vectorise across strikes instead of one Python-loop tree per row
@devsingh05▲ 13 net votes
An endpoint built 16 pure-Python lattices per row and the caller discarded ~90% of rows. Requesting only needed rows and vectorising across all strikes was ~20x faster at 4x the resolution; a closed form then priced a full chain in about 0.1 ms. Check what the caller actually uses before optimising the computation.