Tom Ritchford
Jul 7, 2023

--

Sigh. I agree completely. In fact, there are two separate things here:

1. Ordering your if statements from least consumptive to most consumptive is just a good habit, and some good habits lead to faster code.

2. Some early decisions in your code will make it so that you won't ever be able to deliver the performance you need to win your customer until you rewrite it.

For example, about six years years ago I wrote something that generated audio files in Python, and initially I wrote it in pure Python. The first run took 18 hours. I then rewrote it using Numpy; the second run took 8 minutes.

--

--

No responses yet