Python -O won’t magically make every script faster, but in the right workloads it’s a free win—here’s how to test it safely.
Python programs are set to get faster startup times with PEP 810 "Explicit lazy imports," which allows scripts to defer loading imported libraries until they're actually needed rather than at startup.