Code optimization in Python; Today's reading.
31 Aug 2023
-
Brandon Rohrer, “Making Your Python Code Run Faster,” in How to Train Your Robot, 2023 [Online]. Available at: https://raw.githubusercontent.com/brohrer/how-to-train-your-robot/main/chapter_6/chapter_6.pdf. [Accessed: August 30, 2023]
tl;dr: Profiling, vectorization, pre-compilation with Numba, 10 optimization suggestions, "try it and test it", examples presented in context of a physics simulation. Good discussions about troubleshooting and debugging, when to visualize, determining project goals.
pdf: https://tyr.fyi/6
h/t Amy Tabbcode: https://github.com/brohrer/how-to-train-your-robot/tree/main/chapter_6
web: https://tyr.fyi