Optimizing an algorithm that's quadratic by design

Under the Hood: Building a Real-Time Chord Recognizer