Mercurial > hg > svcore
diff data/model/FFTModel.cpp @ 1258:200c60de27ca 3.0-integration
More timings and cache hit counts
author | Chris Cannam |
---|---|
date | Thu, 10 Nov 2016 09:58:28 +0000 |
parents | 5236543343c3 |
children | bac86d3fc6c9 |
line wrap: on
line diff
--- a/data/model/FFTModel.cpp Thu Nov 10 09:23:05 2016 +0000 +++ b/data/model/FFTModel.cpp Thu Nov 10 09:58:28 2016 +0000 @@ -291,12 +291,12 @@ vector<complex<float>> FFTModel::getFFTColumn(int n) const { - // The small cache (i.e. the m_cached deque) is for peak-frequency - // spectrograms, where values from two consecutive columns are + // The small cache (i.e. the m_cached deque) is for cases where + // values are looked up individually, and for e.g. 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. + // scrolling through a magnitude spectrogram, but 95%+ hits with a + // peak-frequency spectrogram. for (const auto &incache : m_cached) { if (incache.n == n) { inSmallCache.hit(); @@ -304,6 +304,8 @@ } } inSmallCache.miss(); + + Profiler profiler("FFTModel::getFFTColumn (cache miss)"); auto samples = getSourceSamples(n); m_windower.cut(samples.data());