Skip to content

Commit 55a7c6a

Browse files
committed
chore(bench): refresh results with pYIN and downbeat speedups
- Re-run the benchmark suite on an idle machine to capture the pYIN Viterbi and downbeat-refinement speedups. - Add the new load-average fields written by the updated harness.
1 parent 1b5c5b7 commit 55a7c6a

2 files changed

Lines changed: 50 additions & 47 deletions

File tree

benchmarks/results.json

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,69 @@
66
"runs_per_case": 3,
77
"methodology": "Both libraries measured 'standalone from raw audio': every per-feature call reconstructs STFT/Mel from the resampled samples. libsonare uses chrono::steady_clock inside C++; librosa uses time.perf_counter around the Python call.",
88
"librosa_version": "0.11.0",
9+
"hardware_threads": 18,
10+
"load_average_before": 1.93,
11+
"load_average_after": 1.82,
912
"full_analysis": {
10-
"libsonare_ms": 1247.05,
11-
"bpm_detector_comprehensive_ms": 39891.3,
12-
"bpm_detector_speedup": 31.99,
13+
"libsonare_ms": 1152.52,
14+
"bpm_detector_comprehensive_ms": 34544.97,
15+
"bpm_detector_speedup": 29.97,
1316
"bpm_detector_version": "1.1.0",
1417
"note": "Full pipeline (BPM + key + beats + chords + sections + timbre + dynamics) running entirely inside libsonare C++. The comparison target is bpm-detector --comprehensive: a pipeline built on librosa, not librosa itself. It is the same author's earlier Python project, chosen because it computes the same set of features end to end; librosa alone has no equivalent one-shot pipeline to time. Ratios against a different librosa-based pipeline will differ."
1518
},
1619
"per_feature": [
1720
{
1821
"feature": "STFT",
19-
"librosa_ms": 16.56,
20-
"libsonare_ms": 13.93,
21-
"speedup": 1.19
22+
"librosa_ms": 12.61,
23+
"libsonare_ms": 13.52,
24+
"speedup": 0.93
2225
},
2326
{
2427
"feature": "Mel Spectrogram",
25-
"librosa_ms": 29.56,
26-
"libsonare_ms": 23.31,
27-
"speedup": 1.27
28+
"librosa_ms": 19.45,
29+
"libsonare_ms": 22.23,
30+
"speedup": 0.88
2831
},
2932
{
3033
"feature": "HPSS",
31-
"librosa_ms": 2129.73,
32-
"libsonare_ms": 99.61,
33-
"speedup": 21.38
34+
"librosa_ms": 1680.69,
35+
"libsonare_ms": 81.94,
36+
"speedup": 20.51
3437
},
3538
{
3639
"feature": "Onset Strength",
37-
"librosa_ms": 32.84,
38-
"libsonare_ms": 23.68,
39-
"speedup": 1.39
40+
"librosa_ms": 20.54,
41+
"libsonare_ms": 22.72,
42+
"speedup": 0.9
4043
},
4144
{
4245
"feature": "Chroma",
43-
"librosa_ms": 66.41,
44-
"libsonare_ms": 15.61,
45-
"speedup": 4.25
46+
"librosa_ms": 41.99,
47+
"libsonare_ms": 14.78,
48+
"speedup": 2.84
4649
},
4750
{
4851
"feature": "Beat Track",
49-
"librosa_ms": 38.62,
50-
"libsonare_ms": 57.95,
51-
"speedup": 0.67
52+
"librosa_ms": 32.88,
53+
"libsonare_ms": 54.95,
54+
"speedup": 0.6
5255
},
5356
{
5457
"feature": "MFCC",
55-
"librosa_ms": 23.42,
56-
"libsonare_ms": 24.05,
57-
"speedup": 0.97
58+
"librosa_ms": 20.8,
59+
"libsonare_ms": 23.01,
60+
"speedup": 0.9
5861
},
5962
{
6063
"feature": "pYIN",
61-
"librosa_ms": 6172.96,
62-
"libsonare_ms": 1644.89,
63-
"speedup": 3.75
64+
"librosa_ms": 5461.02,
65+
"libsonare_ms": 427.89,
66+
"speedup": 12.76
6467
},
6568
{
6669
"feature": "Spectral Centroid",
67-
"librosa_ms": 26.41,
68-
"libsonare_ms": 19.24,
70+
"librosa_ms": 24.86,
71+
"libsonare_ms": 18.12,
6972
"speedup": 1.37
7073
}
7174
]

benchmarks/results_cpp.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
"resampled_sample_rate": 22050,
66
"runs_per_case": 3,
77
"hardware_threads": 18,
8-
"load_average_before": 3.33,
9-
"load_average_after": 5.16,
8+
"load_average_before": 2.01,
9+
"load_average_after": 1.93,
1010
"timing_source": "chrono::steady_clock (C++ internal)",
11-
"full_analysis_ms": 1247.05,
12-
"full_analysis_with_cancel_callback_ms": 1237.67,
11+
"full_analysis_ms": 1152.52,
12+
"full_analysis_with_cancel_callback_ms": 1157.80,
1313
"per_feature_standalone": [
14-
{"feature": "STFT", "libsonare_ms": 13.93},
15-
{"feature": "Mel Spectrogram", "libsonare_ms": 23.31},
16-
{"feature": "HPSS", "libsonare_ms": 99.61},
17-
{"feature": "Onset Strength", "libsonare_ms": 23.68},
18-
{"feature": "Chroma", "libsonare_ms": 15.61},
19-
{"feature": "Beat Track", "libsonare_ms": 57.95},
20-
{"feature": "MFCC", "libsonare_ms": 24.05},
21-
{"feature": "pYIN", "libsonare_ms": 1644.89},
22-
{"feature": "Spectral Centroid", "libsonare_ms": 19.24}
14+
{"feature": "STFT", "libsonare_ms": 13.52},
15+
{"feature": "Mel Spectrogram", "libsonare_ms": 22.23},
16+
{"feature": "HPSS", "libsonare_ms": 81.94},
17+
{"feature": "Onset Strength", "libsonare_ms": 22.72},
18+
{"feature": "Chroma", "libsonare_ms": 14.78},
19+
{"feature": "Beat Track", "libsonare_ms": 54.95},
20+
{"feature": "MFCC", "libsonare_ms": 23.01},
21+
{"feature": "pYIN", "libsonare_ms": 427.89},
22+
{"feature": "Spectral Centroid", "libsonare_ms": 18.12}
2323
],
2424
"per_feature_cached": [
25-
{"feature": "Mel Spectrogram", "libsonare_ms": 9.02},
26-
{"feature": "Onset Strength", "libsonare_ms": 0.48},
27-
{"feature": "Chroma", "libsonare_ms": 1.09},
28-
{"feature": "MFCC", "libsonare_ms": 0.92},
29-
{"feature": "Spectral Centroid", "libsonare_ms": 2.82}
25+
{"feature": "Mel Spectrogram", "libsonare_ms": 8.75},
26+
{"feature": "Onset Strength", "libsonare_ms": 0.50},
27+
{"feature": "Chroma", "libsonare_ms": 1.07},
28+
{"feature": "MFCC", "libsonare_ms": 0.91},
29+
{"feature": "Spectral Centroid", "libsonare_ms": 2.86}
3030
]
3131
}

0 commit comments

Comments
 (0)