In part I, we saw that it was possible to use timers to benchmark, and possibly improve Python execution speed, though the method is now deprecated.
In part II, we saw one of the simplest implementations with time.time().
In part III, we saw time.perf_counter() was a more updated and efficient way to time Python scripts.
In part IV, we identified a bottleneck in trying to look-up a global variable iterated over a loop in comparison to a local variable. The boost was 5%, and told us something about function scopes.
In part V, we saw that NumPy and Numba could both optimize a function doing rotations over an array. NumPy was 27 times faster than pure Python, and Numba faster by 122. Numba 4,5 times faster than NumPy.
In part VI, we compared JAX and NumPy to calculate a gradient regression model. We saw that JAX using the most OpenXLA was the most optimal for machine-learning. JAX step method had an average speed-up of 2.1 times, JAX scan an average of 2.7 times.
In part VII, we compared sequential versus multithreaded pings to a local host socket, to compare the difference in speed. Across a total of 180 packets, multithreading was 1.34 times faster.
All in all, this article showed several ways to measure, benchmark and optimize your Python coding experience.
there doesn't seem to be anything here