As spotted by our continuous benchmark suite, there is a more than 2x slowdown in `pairwise_distances` on sparse input data (for the Euclidean metric). - https://scikit-learn.org/scikit-learn-benchmarks/#metrics.PairwiseDistancesBenchmark.time_pairwise_distances?p-representation='sparse'&p-metric='euclidean'&p-n_jobs=4&commits=b4afbeee-fabe1606 This happened between b4afbeee and fabe1606. Could it be ef5c0879e1367397f671791cdfad46eef8892826? It's not sure because there are many other commits in `git log b4afbeee..fabe1606` and I did not review them all.