Pitanje
📝 **Питање:** Унутрашња нумеричка петља чистог Питхон-а је ваше уско грло. Профилисање потврђује 80% времена проведеног тамо. Најјефтинији пут до 10к?
📋 Изаберите тачан одговор.
💡 **Савет:** Поново прочитајте горњу теорију ако нисте сигурни.
A Rewrite the hot loop in Cython immediately — the speedup is consistently 50-100x across numeric workloads and the toolchain cost is a one-time setup that amortizes quickly across the team B Try NumPy vectorization first (usually 10-100x with no new toolchain). If that's not possible, Cython with `cdef int` typing on the hot loop is the next step. Rust/PyO3 is overkill unless you need it long-term C Switch the interpreter to PyPy — its tracing JIT typically delivers 5-10x on tight numeric loops with zero code changes, making it the lowest-effort win before considering native rewrites at all D Add a memoization cache on the hot function — even with low hit rate, the saved work on repeat inputs usually compensates for the lookup overhead and avoids touching the core algorithm at all