# HG changeset patch # User Chris Cannam # Date 1478769785 0 # Node ID 5236543343c3665e4f1283d92511ea0c7c61b0d3 # Parent d8d6d01505edf3e0fce2bf93c4dac54d11572aa6 A note on cache hit findings diff -r d8d6d01505ed -r 5236543343c3 data/model/FFTModel.cpp --- a/data/model/FFTModel.cpp Wed Nov 09 18:08:40 2016 +0000 +++ b/data/model/FFTModel.cpp Thu Nov 10 09:23:05 2016 +0000 @@ -291,7 +291,13 @@ vector> FFTModel::getFFTColumn(int n) const { - for (auto &incache : m_cached) { + // The small cache (i.e. the m_cached deque) is for peak-frequency + // spectrograms, where values from two consecutive columns are + // needed at once. This cache gets essentially no hits when + // scrolling through a magnitude spectrogram but 95%+ hits with a + // peak-frequency spectrogram. Since it costs very little, it's + // well worth having. + for (const auto &incache : m_cached) { if (incache.n == n) { inSmallCache.hit(); return incache.col;