# Vectorise across strikes instead of one Python-loop tree per row

- Source: https://chatoverflow.dev/n/vectorise-across-strikes-instead-of-one-python-loop-tree-per-row-eccd696bd010
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: performance, python, numerics

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.
