diff --git a/.github/workflows/compare.yml b/.github/workflows/compare.yml index 5c70319..3d96ddd 100644 --- a/.github/workflows/compare.yml +++ b/.github/workflows/compare.yml @@ -17,7 +17,13 @@ on: jobs: compare-icount: name: Comparison instruction counts (${{ matrix.engine }}) - runs-on: ubuntu-latest + # Pinned image, as ci.yml's ratchet is: the counts are a function of the + # apt toolchain, the plugin build and QEMU. The plugin is built against + # QEMU 8.2.2's header (plugin API 1), which ubuntu-24.04's qemu-system-arm + # loads; ubuntu-latest moved to 26.04, whose QEMU 10.2 needs API 2 or + # later and refused the plugin (run 45528691636). The recorded counts + # (bench/compare_counts.json) were measured on 24.04 as well. + runs-on: ubuntu-24.04 timeout-minutes: 120 strategy: fail-fast: false @@ -100,9 +106,12 @@ jobs: # remainder construction (async/bench/icount/cmp_main.cpp, # bridge/bench/icount/cmp_main.cpp). for bin in $(scripts/compare_binaries.sh ${{ matrix.engine }}); do + # || true: a QEMU that exits non-zero (a refused plugin, a + # crashed guest) reaches the check below, which prints why, + # instead of ending the step silently under bash -e. out=$(qemu-system-arm -M $machine -nographic -semihosting \ -d plugin -plugin /tmp/libinsncount.so \ - -kernel build-$tgt/$bin 2>&1) + -kernel build-$tgt/$bin 2>&1) || true echo "$out" | grep -q 'ICOUNT_DONE ok=1' || { echo "$out"; echo "::error::$tgt $bin did not complete"; exit 1; } n=$(echo "$out" | grep -o 'TAP_SR_INSN_COUNT [0-9]*' | cut -d' ' -f2) @@ -159,7 +168,7 @@ jobs: cmake --build build-hex -j 4 for bin in $(scripts/compare_binaries.sh ${{ matrix.engine }}); do out=$(qemu-hexagon -d plugin -plugin /tmp/libinsncount.so \ - build-hex/$bin 2>&1) + build-hex/$bin 2>&1) || true echo "$out" | grep -q 'ICOUNT_DONE ok=1' || { echo "$out"; echo "::error::hexagon $bin did not complete"; exit 1; } n=$(echo "$out" | grep -o 'TAP_SR_INSN_COUNT [0-9]*' | cut -d' ' -f2) diff --git a/async/bench/compare_counts.json b/async/bench/compare_counts.json index e16731b..5921610 100644 --- a/async/bench/compare_counts.json +++ b/async/bench/compare_counts.json @@ -1,34 +1,34 @@ { "provenance": { - "sha": "667934a2d10d73b5017e5eb85c1c2325073115d8", - "dsptap": "d7ebe4bc5dc9db5d9aef306795c709f034de6cf7", - "run_id": "38013347369", - "run_url": "https://github.com/tap/SampleRateTap/actions/runs/38013347369", - "date": "2026-10-10", - "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" + "sha": "f1816cc957e7c2763144a6975c02d5909c76a278", + "dsptap": "4b30a02a15c25568b9931ab6385012fa147dc835", + "run_id": "45540985569", + "run_url": "https://github.com/tap/SampleRateTap/actions/runs/45540985569", + "date": "2026-11-25", + "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.133.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" }, "counts": { "hexagon": { - "cmp_icount_lsr_best": 2588013392, - "cmp_icount_lsr_best_4s": 5171981607, - "cmp_icount_lsr_medium": 873790422, - "cmp_icount_lsr_medium_4s": 1740191532, - "cmp_icount_r8b_120": 593058685, - "cmp_icount_r8b_120_4s": 1174818893, - "cmp_icount_r8b_120_tb8": 532925916, - "cmp_icount_r8b_120_tb8_4s": 1053228490, - "cmp_icount_speex_fixed_q10": 206348956, - "cmp_icount_speex_fixed_q10_4s": 386139052, - "cmp_icount_speex_fixed_q4": 67031791, - "cmp_icount_speex_fixed_q4_4s": 124308454, - "cmp_icount_speex_float_q10": 2979838469, - "cmp_icount_speex_float_q10_4s": 5933851540, - "cmp_icount_speex_float_q4": 72267855, - "cmp_icount_speex_float_q4_4s": 135577688, - "cmp_icount_srt_float": 397694085, - "cmp_icount_srt_float_4s": 662088538, - "cmp_icount_srt_q15": 179697127, - "cmp_icount_srt_q15_4s": 223575034 + "cmp_icount_lsr_best": 2588013417, + "cmp_icount_lsr_best_4s": 5171981632, + "cmp_icount_lsr_medium": 873790447, + "cmp_icount_lsr_medium_4s": 1740191557, + "cmp_icount_r8b_120": 593058710, + "cmp_icount_r8b_120_4s": 1174818918, + "cmp_icount_r8b_120_tb8": 532925941, + "cmp_icount_r8b_120_tb8_4s": 1053228515, + "cmp_icount_speex_fixed_q10": 206348981, + "cmp_icount_speex_fixed_q10_4s": 386139077, + "cmp_icount_speex_fixed_q4": 67031816, + "cmp_icount_speex_fixed_q4_4s": 124308479, + "cmp_icount_speex_float_q10": 2979838494, + "cmp_icount_speex_float_q10_4s": 5933851565, + "cmp_icount_speex_float_q4": 72267880, + "cmp_icount_speex_float_q4_4s": 135577713, + "cmp_icount_srt_float": 396922412, + "cmp_icount_srt_float_4s": 660547594, + "cmp_icount_srt_q15": 178629893, + "cmp_icount_srt_q15_4s": 221443052 }, "m33": { "cmp_icount_lsr_best": 14344956886, @@ -47,10 +47,10 @@ "cmp_icount_speex_float_q10_4s": 34662634874, "cmp_icount_speex_float_q4": 240159001, "cmp_icount_speex_float_q4_4s": 452503354, - "cmp_icount_srt_float": 2339059866, - "cmp_icount_srt_float_4s": 3808080433, - "cmp_icount_srt_q15": 967845318, - "cmp_icount_srt_q15_4s": 1052206578 + "cmp_icount_srt_float": 2337375075, + "cmp_icount_srt_float_4s": 3804711631, + "cmp_icount_srt_q15": 965010010, + "cmp_icount_srt_q15_4s": 1046536866 }, "m55": { "cmp_icount_lsr_best": 614379291, @@ -69,10 +69,10 @@ "cmp_icount_speex_float_q10_4s": 1906047107, "cmp_icount_speex_float_q4": 152220021, "cmp_icount_speex_float_q4_4s": 302783168, - "cmp_icount_srt_float": 96150559, - "cmp_icount_srt_float_4s": 174960038, - "cmp_icount_srt_q15": 101050856, - "cmp_icount_srt_q15_4s": 183677221 + "cmp_icount_srt_float": 94455147, + "cmp_icount_srt_float_4s": 171570287, + "cmp_icount_srt_q15": 97931890, + "cmp_icount_srt_q15_4s": 177440339 } } } diff --git a/async/docs/COMPARISON.md b/async/docs/COMPARISON.md index 5aae79f..fcc50b1 100644 --- a/async/docs/COMPARISON.md +++ b/async/docs/COMPARISON.md @@ -215,9 +215,9 @@ old metric reproduce the previous table exactly (2,218 / 6,400 on M55, 49,424 Measured in `compare.yml` run -[38013347369](https://github.com/tap/SampleRateTap/actions/runs/38013347369) -on `667934a` (DspTap `d7ebe4b`), 2026-10-10; arm-none-eabi-gcc 15:13.2.rel1-2, -qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), +[45540985569](https://github.com/tap/SampleRateTap/actions/runs/45540985569) +on `f1816cc` (DspTap `4b30a02`), 2026-11-25; arm-none-eabi-gcc 15:13.2.rel1-2, +qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.133.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests. Steady state, instructions per stereo output frame (× = vs. SampleRateTap @@ -226,16 +226,16 @@ SampleRateTap row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **SampleRateTap** balanced, float | **821** | 15,302 | 2,754 | -| **SampleRateTap** balanced, Q15 | 861 | **879** | **457** | +| **SampleRateTap** balanced, float | **803** | 15,285 | 2,746 | +| **SampleRateTap** balanced, Q15 | 828 | **849** | **446** | | r8brain 120 dB, default 2 % band³ | 1,002 (1.2×) | 30,004 (2.0×) | 6,060 (2.2×) | -| r8brain 120 dB, 8 % band (flat to 20 kHz)³ | 934 (1.1×) | 26,619 (1.7×) | 5,420 (2.0×) | +| r8brain 120 dB, 8 % band (flat to 20 kHz)³ | 934 (1.2×) | 26,619 (1.7×) | 5,420 (2.0×) | | libsamplerate `MEDIUM` | 2,203 (2.7×) | 49,206 (3.2×) | 9,025 (3.3×) | -| libsamplerate `BEST` | 6,392 (7.8×) | 149,420 (9.8×) | 26,916 (9.8×) | -| SpeexDSP float, quality 10 (~100 dB) | 9,903 (12.1×) | 180,098 (11.8×) | 30,771 (11.2×) | -| SpeexDSP float, quality 4 (its passband knee) | 1,568 (1.9×) | 2,212 (0.1×) | 659 (0.2×) | -| SpeexDSP fixed-point, quality 10 (× vs. Q15) | 5,902 (6.9×) | 6,430 (7.3×) | 1,873 (4.1×) | -| SpeexDSP fixed-point, quality 4 (× vs. Q15) | 1,673 (1.9×) | 1,797 (2.0×) | 597 (1.3×) | +| libsamplerate `BEST` | 6,392 (8.0×) | 149,420 (9.8×) | 26,916 (9.8×) | +| SpeexDSP float, quality 10 (~100 dB) | 9,903 (12.3×) | 180,098 (11.8×) | 30,771 (11.2×) | +| SpeexDSP float, quality 4 (its passband knee) | 1,568 (2.0×) | 2,212 (0.1×) | 659 (0.2×) | +| SpeexDSP fixed-point, quality 10 (× vs. Q15) | 5,902 (7.1×) | 6,430 (7.6×) | 1,873 (4.2×) | +| SpeexDSP fixed-point, quality 4 (× vs. Q15) | 1,673 (2.0×) | 1,797 (2.1×) | 597 (1.3×) | One-time construction, millions of instructions: @@ -252,10 +252,10 @@ One-time construction, millions of instructions: | SpeexDSP fixed-point, quality 10 | 5.2 | 98.8 | 26.6 | | SpeexDSP fixed-point, quality 4 | 2.0 | 33.6 | 9.8 | -Key figures: on the M33 the Q15 datapath costs **879 instructions/frame** in -steady state, libsamplerate `MEDIUM` **~56×** that and r8brain at 8 % -**~30×**, SpeexDSP's fixed-point build at quality 4 **2.0×**; on the M55 the -float datapath (821) is cheaper than Q15 (861) by 5%. +Key figures: on the M33 the Q15 datapath costs **849 instructions/frame** in +steady state, libsamplerate `MEDIUM` **~58×** that and r8brain at 8 % +**~31×**, SpeexDSP's fixed-point build at quality 4 **2.1×**; on the M55 the +float datapath (803) is cheaper than Q15 (828) by 3%. ² The float datapath is soft-double-bound on the FP64-less M33 and @@ -272,16 +272,16 @@ much); before it, Q15 cost 42 % more than float there. **SpeexDSP's rows read per target.** On the M55, the one target where SampleRateTap's float datapath is its cheaper row, SpeexDSP's cheapest setting (quality 4, the row that matches `balanced`'s latency class at -−0.42 dB by 20 kHz) costs ~1.9× `balanced` in either build, and its quality +−0.42 dB by 20 kHz) costs ~2.0× `balanced` in either build, and its quality 10 ~7× (fixed-point) to ~12× (float). On the M33 and Hexagon the Q15 row is the one that runs (footnote ²: the float datapath accumulates in double, soft-float on both FP64-less cores), and Speex's float build is single-precision throughout, so its float rows undercut that float row by an order of magnitude; against the Q15 datapath its quality 4 costs 1.3× -(Hexagon) to 2.0× (M33) fixed-point and 1.4× to 2.5× float, its quality 10 -4× to 7× fixed-point and 70× to 200× float. The one row a Q15 caller -would weigh is its fixed-point build at quality 4: within 2× of the Q15 -datapath on every target, at a third more latency (32 frames against 24) +(Hexagon) to 2.1× (M33) fixed-point and 1.5× to 2.6× float, its quality 10 +4× to 8× fixed-point and 70× to 210× float. The one row a Q15 caller +would weigh is its fixed-point build at quality 4: 1.3–2.1× the Q15 +datapath across the targets, at a third more latency (32 frames against 24) and a −0.42 dB shelf at 20 kHz. Its construction is cheap, as the other libraries' is (under 100 M instructions on the M33, under 27 M elsewhere). @@ -307,12 +307,12 @@ cost for devices that construct at boot. | | Type | Clock recovery | Ratio range | Quality | Latency | Footprint / targets | License & form | |---|---|---|---|---|---|---|---| -| **SampleRateTap** | software ASRC | built-in (PI servo on FIFO occupancy) | near-unity (±~1000 ppm) | −134 dB THD+N / 149 dB DR measured above; Q15/Q31 paths for FPU-less DSPs | **1.5 ms default** (0.5 ms filter); sub-ms with `fast()` | 308× RT/core x86; Q15 datapath 457 insn/frame stereo steady-state on Hexagon, 879 on M33 (above), CI-gated | MIT, header-only C++20 | +| **SampleRateTap** | software ASRC | built-in (PI servo on FIFO occupancy) | near-unity (±~1000 ppm) | −134 dB THD+N / 149 dB DR measured above; Q15/Q31 paths for FPU-less DSPs | **1.5 ms default** (0.5 ms filter); sub-ms with `fast()` | 308× RT/core x86; Q15 datapath 446 insn/frame stereo steady-state on Hexagon, 849 on M33 (above), CI-gated | MIT, header-only C++20 | | [AD1896][ad1896] (ADI) | hardware ASRC | built-in | 1:8 up / 7.75:1 down | THD+N −117 dB min / −133 dB best; 142 dB DNR (datasheet) | sub-ms–ms, mode dependent | dedicated chip, one stereo pair | proprietary | | [SRC4392][src4392] (TI) | hardware ASRC | built-in (automatic) | 1:16–16:1 | THD+N −140 dB typ; 144 dB DR (datasheet) | selectable filter delay | dedicated chip + DIR/DIT | proprietary | | [libsamplerate][lsr] | resampler library | **no** — caller supplies ratio | 1/256–256 | measured above (near-unity); 97 dB worst-case across ratios (own docs) | filter-dependent, offline-friendly | portable C, float | BSD-2 | | [soxr][soxr] | resampler library | no (fixed ratio + bounded VR mode) | wide | measured above (near-unity) | quality-dependent | portable C, SIMD | LGPL | -| [r8brain-free-src][r8b] | resampler library | no — caller supplies ratio | arbitrary | measured above (near-unity, 24-bit preset at the format ceilings); stopband user-set 49–218 dB | transition-band dependent: 16 ms default at 120 dB here, 4.2 ms flat to 20 kHz, ~1 ms only with a 13 kHz-class roll-off | double precision, no fixed-point path; SSE2/AVX/NEON; ~1.1–2.2× SampleRateTap's float steady state on the embedded targets above | MIT, header-only C++ | +| [r8brain-free-src][r8b] | resampler library | no — caller supplies ratio | arbitrary | measured above (near-unity, 24-bit preset at the format ceilings); stopband user-set 49–218 dB | transition-band dependent: 16 ms default at 120 dB here, 4.2 ms flat to 20 kHz, ~1 ms only with a 13 kHz-class roll-off | double precision, no fixed-point path; SSE2/AVX/NEON; ~1.2–2.2× SampleRateTap's float steady state on the embedded targets above | MIT, header-only C++ | | [SpeexDSP resampler][speex] | resampler library | no — caller supplies ratio (`set_rate_frac`) | arbitrary | measured above: float build at `balanced`'s level, fixed-point build at the 16-bit floor beside the Q15 row; "~100 dB" at best by its own table, and never flat to 20 kHz (−0.42 dB from quality 4 up) | quality-set: 32 frames (0.67 ms) at quality 4, 128 (2.7 ms) at 10 | portable C; **the one competitor with a fixed-point build** (Q15 I/O); its cost against the Q15 datapath on the embedded targets is in the tables above | BSD-3, C | | zita-resampler + zita-ajbridge | resampler + DLL servo | ajbridge adds a delay-locked loop | near-unity (bridge) | designed for 24-bit transparency; no published CI-verified figures | several ms (period-driven) | Linux/JACK, float | GPL | | OS engines (CoreAudio, WASAPI shared, PipeWire) | system ASRC | built-in, opaque | device-dependent | unpublished; generally well below the above | typically 5–20 ms | bundled | n/a | diff --git a/book/src/part0/two-crystals.md b/book/src/part0/two-crystals.md index 9f45b32..ee83800 100644 --- a/book/src/part0/two-crystals.md +++ b/book/src/part0/two-crystals.md @@ -205,8 +205,8 @@ and the comparison document names its mechanism exactly: a 48-tap window with a creeping phase, instead of general-ratio machinery. On targets without floating-point hardware the dividend compounds — the Q15 fixed-point datapath has no libsamplerate analog at all, and on a -Pico-class Cortex-M33 the cheapest libsamplerate option costs about 56× -the Q15 datapath's steady-state cost of 879 instructions per frame. (An +Pico-class Cortex-M33 the cheapest libsamplerate option costs about 58× +the Q15 datapath's steady-state cost of 849 instructions per frame. (An earlier revision said 9.8×, from a per-frame figure that folded the converter's one-time construction into a 2 s workload; the comparison document now reports steady state and construction separately.) diff --git a/bridge/bench/compare_counts.json b/bridge/bench/compare_counts.json index 4099aa2..37f9255 100644 --- a/bridge/bench/compare_counts.json +++ b/bridge/bench/compare_counts.json @@ -1,54 +1,54 @@ { "provenance": { - "sha": "667934a2d10d73b5017e5eb85c1c2325073115d8", - "dsptap": "d7ebe4bc5dc9db5d9aef306795c709f034de6cf7", - "run_id": "38013347369", - "run_url": "https://github.com/tap/SampleRateTap/actions/runs/38013347369", - "date": "2026-10-10", - "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" + "sha": "f1816cc957e7c2763144a6975c02d5909c76a278", + "dsptap": "4b30a02a15c25568b9931ab6385012fa147dc835", + "run_id": "45540985569", + "run_url": "https://github.com/tap/SampleRateTap/actions/runs/45540985569", + "date": "2026-11-25", + "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.133.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" }, "counts": { "hexagon": { - "cmp_bridge_icount_down_lsr_best": 2582486627, - "cmp_bridge_icount_down_lsr_best_4s": 5161232549, - "cmp_bridge_icount_down_lsr_medium": 868968930, - "cmp_bridge_icount_down_lsr_medium_4s": 1730546150, - "cmp_bridge_icount_down_r8b_eco": 277689850, - "cmp_bridge_icount_down_r8b_eco_4s": 544018561, - "cmp_bridge_icount_down_r8b_tr": 335685513, - "cmp_bridge_icount_down_r8b_tr_4s": 656922188, - "cmp_bridge_icount_down_speex_fixed_q3": 56763674, - "cmp_bridge_icount_down_speex_fixed_q3_4s": 104840766, - "cmp_bridge_icount_down_speex_float_q3": 61770503, - "cmp_bridge_icount_down_speex_float_q3_4s": 115224528, - "cmp_bridge_icount_down_speex_float_q9": 2227779506, - "cmp_bridge_icount_down_speex_float_q9_4s": 4440417345, - "cmp_bridge_icount_down_srt_eco_float": 304600338, - "cmp_bridge_icount_down_srt_eco_float_4s": 585167647, - "cmp_bridge_icount_down_srt_eco_q15": 45670393, - "cmp_bridge_icount_down_srt_eco_q15_4s": 66377019, - "cmp_bridge_icount_down_srt_tr_float": 944327103, - "cmp_bridge_icount_down_srt_tr_float_4s": 1822168405, - "cmp_bridge_icount_up_lsr_best": 2587159719, - "cmp_bridge_icount_up_lsr_best_4s": 5171197462, - "cmp_bridge_icount_up_lsr_medium": 872881167, - "cmp_bridge_icount_up_lsr_medium_4s": 1739001238, - "cmp_bridge_icount_up_r8b_eco": 251853676, - "cmp_bridge_icount_up_r8b_eco_4s": 494558154, - "cmp_bridge_icount_up_r8b_tr": 308716862, - "cmp_bridge_icount_up_r8b_tr_4s": 607244781, - "cmp_bridge_icount_up_speex_fixed_q3": 54396668, - "cmp_bridge_icount_up_speex_fixed_q3_4s": 100839186, - "cmp_bridge_icount_up_speex_float_q3": 58968031, - "cmp_bridge_icount_up_speex_float_q3_4s": 110317623, - "cmp_bridge_icount_up_speex_float_q9": 2235610553, - "cmp_bridge_icount_up_speex_float_q9_4s": 4457241304, - "cmp_bridge_icount_up_srt_eco_float": 219550023, - "cmp_bridge_icount_up_srt_eco_float_4s": 420367693, - "cmp_bridge_icount_up_srt_eco_q15": 35317750, - "cmp_bridge_icount_up_srt_eco_q15_4s": 51172086, - "cmp_bridge_icount_up_srt_tr_float": 533146381, - "cmp_bridge_icount_up_srt_tr_float_4s": 1025856571 + "cmp_bridge_icount_down_lsr_best": 2582486652, + "cmp_bridge_icount_down_lsr_best_4s": 5161232574, + "cmp_bridge_icount_down_lsr_medium": 868968955, + "cmp_bridge_icount_down_lsr_medium_4s": 1730546175, + "cmp_bridge_icount_down_r8b_eco": 277689875, + "cmp_bridge_icount_down_r8b_eco_4s": 544018586, + "cmp_bridge_icount_down_r8b_tr": 335685538, + "cmp_bridge_icount_down_r8b_tr_4s": 656922213, + "cmp_bridge_icount_down_speex_fixed_q3": 56763699, + "cmp_bridge_icount_down_speex_fixed_q3_4s": 104840791, + "cmp_bridge_icount_down_speex_float_q3": 61770528, + "cmp_bridge_icount_down_speex_float_q3_4s": 115224553, + "cmp_bridge_icount_down_speex_float_q9": 2227779531, + "cmp_bridge_icount_down_speex_float_q9_4s": 4440417370, + "cmp_bridge_icount_down_srt_eco_float": 304444255, + "cmp_bridge_icount_down_srt_eco_float_4s": 584858333, + "cmp_bridge_icount_down_srt_eco_q15": 45564841, + "cmp_bridge_icount_down_srt_eco_q15_4s": 66168359, + "cmp_bridge_icount_down_srt_tr_float": 943996549, + "cmp_bridge_icount_down_srt_tr_float_4s": 1821510851, + "cmp_bridge_icount_up_lsr_best": 2587159744, + "cmp_bridge_icount_up_lsr_best_4s": 5171197487, + "cmp_bridge_icount_up_lsr_medium": 872881192, + "cmp_bridge_icount_up_lsr_medium_4s": 1739001263, + "cmp_bridge_icount_up_r8b_eco": 251853701, + "cmp_bridge_icount_up_r8b_eco_4s": 494558179, + "cmp_bridge_icount_up_r8b_tr": 308716887, + "cmp_bridge_icount_up_r8b_tr_4s": 607244806, + "cmp_bridge_icount_up_speex_fixed_q3": 54396693, + "cmp_bridge_icount_up_speex_fixed_q3_4s": 100839211, + "cmp_bridge_icount_up_speex_float_q3": 58968056, + "cmp_bridge_icount_up_speex_float_q3_4s": 110317648, + "cmp_bridge_icount_up_speex_float_q9": 2235610578, + "cmp_bridge_icount_up_speex_float_q9_4s": 4457241329, + "cmp_bridge_icount_up_srt_eco_float": 219399676, + "cmp_bridge_icount_up_srt_eco_float_4s": 420069750, + "cmp_bridge_icount_up_srt_eco_q15": 35210723, + "cmp_bridge_icount_up_srt_eco_q15_4s": 50960414, + "cmp_bridge_icount_up_srt_tr_float": 532944035, + "cmp_bridge_icount_up_srt_tr_float_4s": 1025454990 }, "m33": { "cmp_bridge_icount_down_lsr_best": 14397684227, @@ -65,12 +65,12 @@ "cmp_bridge_icount_down_speex_float_q3_4s": 380334579, "cmp_bridge_icount_down_speex_float_q9": 12995707104, "cmp_bridge_icount_down_speex_float_q9_4s": 25942033962, - "cmp_bridge_icount_down_srt_eco_float": 1720119300, - "cmp_bridge_icount_down_srt_eco_float_4s": 3309478894, - "cmp_bridge_icount_down_srt_eco_q15": 173215285, - "cmp_bridge_icount_down_srt_eco_q15_4s": 210140800, - "cmp_bridge_icount_down_srt_tr_float": 5472856040, - "cmp_bridge_icount_down_srt_tr_float_4s": 10508704735, + "cmp_bridge_icount_down_srt_eco_float": 1720414248, + "cmp_bridge_icount_down_srt_eco_float_4s": 3310055843, + "cmp_bridge_icount_down_srt_eco_q15": 173163227, + "cmp_bridge_icount_down_srt_eco_q15_4s": 210073050, + "cmp_bridge_icount_down_srt_tr_float": 5472742501, + "cmp_bridge_icount_down_srt_tr_float_4s": 10508436997, "cmp_bridge_icount_up_lsr_best": 14302075699, "cmp_bridge_icount_up_lsr_best_4s": 28607257283, "cmp_bridge_icount_up_lsr_medium": 4728800043, @@ -85,12 +85,12 @@ "cmp_bridge_icount_up_speex_float_q3_4s": 368987026, "cmp_bridge_icount_up_speex_float_q9": 13021597626, "cmp_bridge_icount_up_speex_float_q9_4s": 25998924924, - "cmp_bridge_icount_up_srt_eco_float": 1229247019, - "cmp_bridge_icount_up_srt_eco_float_4s": 2360935090, - "cmp_bridge_icount_up_srt_eco_q15": 131215930, - "cmp_bridge_icount_up_srt_eco_q15_4s": 160524723, - "cmp_bridge_icount_up_srt_tr_float": 3108075607, - "cmp_bridge_icount_up_srt_tr_float_4s": 5960530618 + "cmp_bridge_icount_up_srt_eco_float": 1229539270, + "cmp_bridge_icount_up_srt_eco_float_4s": 2361517181, + "cmp_bridge_icount_up_srt_eco_q15": 131272607, + "cmp_bridge_icount_up_srt_eco_q15_4s": 160671493, + "cmp_bridge_icount_up_srt_tr_float": 3107933206, + "cmp_bridge_icount_up_srt_tr_float_4s": 5960238912 }, "m55": { "cmp_bridge_icount_down_lsr_best": 612041808, @@ -107,12 +107,12 @@ "cmp_bridge_icount_down_speex_float_q3_4s": 246324434, "cmp_bridge_icount_down_speex_float_q9": 714629566, "cmp_bridge_icount_down_speex_float_q9_4s": 1426552315, - "cmp_bridge_icount_down_srt_eco_float": 73357525, - "cmp_bridge_icount_down_srt_eco_float_4s": 142840097, - "cmp_bridge_icount_down_srt_eco_q15": 22692286, - "cmp_bridge_icount_down_srt_eco_q15_4s": 41158202, - "cmp_bridge_icount_down_srt_tr_float": 214695941, - "cmp_bridge_icount_down_srt_tr_float_4s": 419033828, + "cmp_bridge_icount_down_srt_eco_float": 72950911, + "cmp_bridge_icount_down_srt_eco_float_4s": 142027468, + "cmp_bridge_icount_down_srt_eco_q15": 21943474, + "cmp_bridge_icount_down_srt_eco_q15_4s": 39660913, + "cmp_bridge_icount_down_srt_tr_float": 213932668, + "cmp_bridge_icount_down_srt_tr_float_4s": 417508140, "cmp_bridge_icount_up_lsr_best": 613328033, "cmp_bridge_icount_up_lsr_best_4s": 1226085004, "cmp_bridge_icount_up_lsr_medium": 212057746, @@ -127,12 +127,12 @@ "cmp_bridge_icount_up_speex_float_q3_4s": 233715131, "cmp_bridge_icount_up_speex_float_q9": 718637014, "cmp_bridge_icount_up_speex_float_q9_4s": 1434773431, - "cmp_bridge_icount_up_srt_eco_float": 54973988, - "cmp_bridge_icount_up_srt_eco_float_4s": 106896021, - "cmp_bridge_icount_up_srt_eco_q15": 19052221, - "cmp_bridge_icount_up_srt_eco_q15_4s": 34788647, - "cmp_bridge_icount_up_srt_tr_float": 125872278, - "cmp_bridge_icount_up_srt_tr_float_4s": 245370092 + "cmp_bridge_icount_up_srt_eco_float": 54276460, + "cmp_bridge_icount_up_srt_eco_float_4s": 105501522, + "cmp_bridge_icount_up_srt_eco_q15": 18256410, + "cmp_bridge_icount_up_srt_eco_q15_4s": 33197318, + "cmp_bridge_icount_up_srt_tr_float": 124902702, + "cmp_bridge_icount_up_srt_tr_float_4s": 243431639 } } } diff --git a/bridge/docs/COMPARISON.md b/bridge/docs/COMPARISON.md index 48de909..c4cd36c 100644 --- a/bridge/docs/COMPARISON.md +++ b/bridge/docs/COMPARISON.md @@ -202,9 +202,9 @@ cross-compiled here. Measured in `compare.yml` run -[38013347369](https://github.com/tap/SampleRateTap/actions/runs/38013347369) -on `667934a` (DspTap `d7ebe4b`), 2026-10-10; arm-none-eabi-gcc 15:13.2.rel1-2, -qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), +[45540985569](https://github.com/tap/SampleRateTap/actions/runs/45540985569) +on `f1816cc` (DspTap `4b30a02`), 2026-11-25; arm-none-eabi-gcc 15:13.2.rel1-2, +qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.133.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests. **48 → 44.1 kHz.** Steady state, instructions per stereo output frame (× = vs. the @@ -212,13 +212,13 @@ bridge row the label names; the cheapest bridge row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **bridge** economy, float | 788 | 18,020 | 3,181 | -| **bridge** economy, Q15 | **209** | **419** | **235** | -| **bridge** transparent, float | 2,317 | 57,096 | 9,953 | +| **bridge** economy, float | 783 | 18,023 | 3,179 | +| **bridge** economy, Q15 | **201** | **418** | **234** | +| **bridge** transparent, float | 2,308 | 57,094 | 9,949 | | libsamplerate `MEDIUM` (economy-matched) | 2,374 (3.0×) | 54,015 (3.0×) | 9,768 (3.1×) | | r8brain 70 dB, 12 % band (economy-matched)³ | 625 (0.8×) | 14,124 (0.8×) | 3,020 (0.9×) | | SpeexDSP float, quality 3 (economy-matched) | 1,388 (1.8×) | 2,012 (0.1×) | 606 (0.2×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 1,496 (7.1×) | 1,601 (3.8×) | 545 (2.3×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 1,496 (7.4×) | 1,601 (3.8×) | 545 (2.3×) | | libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,932 (3.0×) | 163,254 (2.9×) | 29,237 (2.9×) | | r8brain 120 dB, 6 % band (transparent-matched; × vs. transparent)³ | 673 (0.3×) | 17,461 (0.3×) | 3,642 (0.4×) | | SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 8,072 (3.5×) | 146,784 (2.6×) | 25,087 (2.5×) | @@ -243,14 +243,14 @@ bridge row the label names; the cheapest bridge row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **bridge** economy, float | 541 | 11,788 | 2,092 | -| **bridge** economy, Q15 | **164** | **305** | **165** | -| **bridge** transparent, float | 1,245 | 29,713 | 5,132 | +| **bridge** economy, float | 534 | 11,791 | 2,090 | +| **bridge** economy, Q15 | **156** | **306** | **164** | +| **bridge** transparent, float | 1,235 | 29,712 | 5,130 | | libsamplerate `MEDIUM` (economy-matched) | 2,196 (4.1×) | 49,060 (4.2×) | 9,022 (4.3×) | | r8brain 70 dB, 12 % band (economy-matched)³ | 524 (1.0×) | 11,809 (1.0×) | 2,528 (1.2×) | -| SpeexDSP float, quality 3 (economy-matched) | 1,210 (2.2×) | 1,801 (0.2×) | 535 (0.3×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 1,316 (8.0×) | 1,403 (4.6×) | 484 (2.9×) | -| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,383 (5.1×) | 149,012 (5.0×) | 26,917 (5.2×) | +| SpeexDSP float, quality 3 (economy-matched) | 1,210 (2.3×) | 1,801 (0.2×) | 535 (0.3×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 1,316 (8.5×) | 1,403 (4.6×) | 484 (2.9×) | +| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,383 (5.2×) | 149,012 (5.0×) | 26,917 (5.2×) | | r8brain 120 dB, 6 % band (transparent-matched; × vs. transparent)³ | 574 (0.5×) | 14,888 (0.5×) | 3,110 (0.6×) | | SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 7,460 (6.0×) | 135,180 (4.5×) | 23,142 (4.5×) | @@ -269,17 +269,17 @@ One-time construction, millions of instructions: | r8brain 120 dB, 6 % band (transparent-matched) | 1.5 | 34.7 | 10.2 | | SpeexDSP float, quality 9 (transparent-matched) | 2.5 | 44.3 | 14.0 | -Key figures (48 → 44.1): on the M33 the economy Q15 converter costs **419 +Key figures (48 → 44.1): on the M33 the economy Q15 converter costs **418 instructions/frame** in steady state, SpeexDSP's fixed-point build at quality 3 **3.8×** that, libsamplerate `MEDIUM` **~129×** and r8brain at 70 dB -**~34×**; on the M55 the economy float converter (788) is dearer than Q15 -(209) by 276%. +**~34×**; on the M55 the economy float converter (783) is dearer than Q15 +(201) by 290%. **The Q15 converter is the cheapest row on every target, and the float -rows are not.** Economy in Q15 costs 209 instructions per stereo output -frame on the M55, 419 on the M33 and 235 on Hexagon going down (164 / 305 / -165 going up): 3× under r8brain's economy-matched setting on the M55 and +rows are not.** Economy in Q15 costs 201 instructions per stereo output +frame on the M55, 418 on the M33 and 234 on Hexagon going down (156 / 306 / +164 going up): 3× under r8brain's economy-matched setting on the M55 and 13–34× under it on the two soft-double targets, where r8brain's double-precision datapath pays for every multiply in software. SpeexDSP's fixed-point build, the one competitor that can run there on the Q15 row's diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md index e3d5efe..b9e8873 100644 --- a/docs/COMPARISON.md +++ b/docs/COMPARISON.md @@ -21,16 +21,16 @@ with their engine. - **async.** SampleRateTap measures −134 dB THD+N / 149 dB DR at the 24-bit interface with the servo in the loop, ~10 dB from the oracle-fed libraries' format ceiling: the measured price of clock recovery. On the - Cortex-M33 its Q15 datapath costs 879 instructions per stereo frame in + Cortex-M33 its Q15 datapath costs 849 instructions per stereo frame in steady state; SpeexDSP's fixed-point build, the one competitor with a - fixed-point path, 2.0× that at its passband knee, and the float-only - libraries 30–56×. + fixed-point path, 2.1× that at its passband knee, and the float-only + libraries 31–58×. - **bridge.** `economy` measures its 70 dB design (−91 / −86 dB THD+N by direction) at 29 / 19 input frames of latency; r8brain is the one library that offers that design point, the others overshoot it by 15–50 dB to keep the 18 kHz passband. `transparent` and every frontier setting measure at the 24-bit ceiling. In Q15 `bridge` is the cheapest row on every target - (209 instructions per stereo frame on the M55, 419 on the M33, going + (201 instructions per stereo frame on the M55, 418 on the M33, going down), 3–34× under r8brain's matched setting; in float, r8brain's FFT convolution undercuts `bridge`'s polyphase at both tiers, at 4–15× the latency. @@ -42,10 +42,9 @@ with their engine. measures −93 dB and `transparent` −141 dB (since X17's re-tuned designer; −88 and −140 before); elsewhere every float row is at the 24-bit ceiling. Its Q15 stage is the cheapest row at every ratio on every target - (189–379 instructions per stereo frame on the M55, 291–575 on the M33, - measured before X17 shortened its designs), and in float the short Nyquist stage holds its own against - r8brain's FFT (0.8–2.5× at economy), which `bridge`'s longer polyphase - does not. + (134–319 instructions per stereo frame on the M55, 179–392 on the M33), + and in float the short Nyquist stage holds its own against r8brain's FFT + (0.9–2.8× at economy), which `bridge`'s longer polyphase does not. ## The shared tooling diff --git a/rational/bench/compare_counts.json b/rational/bench/compare_counts.json index a8ac042..736fad1 100644 --- a/rational/bench/compare_counts.json +++ b/rational/bench/compare_counts.json @@ -1,94 +1,94 @@ { "provenance": { - "sha": "667934a2d10d73b5017e5eb85c1c2325073115d8", - "dsptap": "d7ebe4bc5dc9db5d9aef306795c709f034de6cf7", - "run_id": "38013347369", - "run_url": "https://github.com/tap/SampleRateTap/actions/runs/38013347369", - "date": "2026-10-10", - "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" + "sha": "f1816cc957e7c2763144a6975c02d5909c76a278", + "dsptap": "4b30a02a15c25568b9931ab6385012fa147dc835", + "run_id": "45540985569", + "run_url": "https://github.com/tap/SampleRateTap/actions/runs/45540985569", + "date": "2026-11-25", + "toolchains": "arm-none-eabi-gcc 15:13.2.rel1-2, qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.376.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests" }, "counts": { "hexagon": { - "cmp_rational_icount_down2_lsr_best": 5333346775, - "cmp_rational_icount_down2_lsr_best_4s": 10658776422, - "cmp_rational_icount_down2_lsr_medium": 1764230943, - "cmp_rational_icount_down2_lsr_medium_4s": 3513651008, - "cmp_rational_icount_down2_r8b_eco": 194127476, - "cmp_rational_icount_down2_r8b_eco_4s": 372389257, - "cmp_rational_icount_down2_r8b_tr": 247718907, - "cmp_rational_icount_down2_r8b_tr_4s": 479303893, - "cmp_rational_icount_down2_speex_fixed_q3": 54603895, - "cmp_rational_icount_down2_speex_fixed_q3_4s": 92735514, - "cmp_rational_icount_down2_speex_float_q2": 52592545, - "cmp_rational_icount_down2_speex_float_q2_4s": 89488096, - "cmp_rational_icount_down2_speex_float_q9": 1161076522, - "cmp_rational_icount_down2_speex_float_q9_4s": 2306070163, - "cmp_rational_icount_down2_srt_eco_float": 145272633, - "cmp_rational_icount_down2_srt_eco_float_4s": 274833301, - "cmp_rational_icount_down2_srt_eco_q15": 36974851, - "cmp_rational_icount_down2_srt_eco_q15_4s": 57494915, - "cmp_rational_icount_down2_srt_tr_float": 348946466, - "cmp_rational_icount_down2_srt_tr_float_4s": 681999821, - "cmp_rational_icount_r23_lsr_best": 2566699962, - "cmp_rational_icount_r23_lsr_best_4s": 5131131366, - "cmp_rational_icount_r23_lsr_medium": 857992996, - "cmp_rational_icount_r23_lsr_medium_4s": 1708751085, - "cmp_rational_icount_r23_r8b_eco": 219109458, - "cmp_rational_icount_r23_r8b_eco_4s": 430109897, - "cmp_rational_icount_r23_r8b_tr": 227094021, - "cmp_rational_icount_r23_r8b_tr_4s": 445478690, - "cmp_rational_icount_r23_speex_fixed_q3": 26557634, - "cmp_rational_icount_r23_speex_fixed_q3_4s": 44759343, - "cmp_rational_icount_r23_speex_float_q2": 24909069, - "cmp_rational_icount_r23_speex_float_q2_4s": 41884878, - "cmp_rational_icount_r23_speex_float_q9": 571022556, - "cmp_rational_icount_r23_speex_float_q9_4s": 1133564407, - "cmp_rational_icount_r23_srt_eco_float": 127089690, - "cmp_rational_icount_r23_srt_eco_float_4s": 246225378, - "cmp_rational_icount_r23_srt_eco_q15": 19998162, - "cmp_rational_icount_r23_srt_eco_q15_4s": 31667104, - "cmp_rational_icount_r23_srt_tr_float": 277846459, - "cmp_rational_icount_r23_srt_tr_float_4s": 547551077, - "cmp_rational_icount_r32_lsr_best": 2653338479, - "cmp_rational_icount_r32_lsr_best_4s": 5307218597, - "cmp_rational_icount_r32_lsr_medium": 895200766, - "cmp_rational_icount_r32_lsr_medium_4s": 1785801041, - "cmp_rational_icount_r32_r8b_eco": 214370068, - "cmp_rational_icount_r32_r8b_eco_4s": 423223263, - "cmp_rational_icount_r32_r8b_tr": 221375724, - "cmp_rational_icount_r32_r8b_tr_4s": 436638164, - "cmp_rational_icount_r32_speex_fixed_q3": 22183614, - "cmp_rational_icount_r32_speex_fixed_q3_4s": 38734256, - "cmp_rational_icount_r32_speex_float_q2": 18287080, - "cmp_rational_icount_r32_speex_float_q2_4s": 31237689, - "cmp_rational_icount_r32_speex_float_q9": 552021649, - "cmp_rational_icount_r32_speex_float_q9_4s": 1098159211, - "cmp_rational_icount_r32_srt_eco_float": 88589853, - "cmp_rational_icount_r32_srt_eco_float_4s": 171824936, - "cmp_rational_icount_r32_srt_eco_q15": 17109407, - "cmp_rational_icount_r32_srt_eco_q15_4s": 28614824, - "cmp_rational_icount_r32_srt_tr_float": 182917572, - "cmp_rational_icount_r32_srt_tr_float_4s": 360291203, - "cmp_rational_icount_up2_lsr_best": 5377169921, - "cmp_rational_icount_up2_lsr_best_4s": 10754355066, - "cmp_rational_icount_up2_lsr_medium": 1807944430, - "cmp_rational_icount_up2_lsr_medium_4s": 3608919032, - "cmp_rational_icount_up2_r8b_eco": 186909408, - "cmp_rational_icount_up2_r8b_eco_4s": 365761096, - "cmp_rational_icount_up2_r8b_tr": 239772717, - "cmp_rational_icount_up2_r8b_tr_4s": 471220700, - "cmp_rational_icount_up2_speex_fixed_q3": 40043637, - "cmp_rational_icount_up2_speex_fixed_q3_4s": 71781440, - "cmp_rational_icount_up2_speex_float_q2": 32893945, - "cmp_rational_icount_up2_speex_float_q2_4s": 57887792, - "cmp_rational_icount_up2_speex_float_q9": 1092549495, - "cmp_rational_icount_up2_speex_float_q9_4s": 2176813344, - "cmp_rational_icount_up2_srt_eco_float": 137893677, - "cmp_rational_icount_up2_srt_eco_float_4s": 267872335, - "cmp_rational_icount_up2_srt_eco_q15": 28124660, - "cmp_rational_icount_up2_srt_eco_q15_4s": 47965308, - "cmp_rational_icount_up2_srt_tr_float": 340618767, - "cmp_rational_icount_up2_srt_tr_float_4s": 673144671 + "cmp_rational_icount_down2_lsr_best": 5333346811, + "cmp_rational_icount_down2_lsr_best_4s": 10658776458, + "cmp_rational_icount_down2_lsr_medium": 1764230979, + "cmp_rational_icount_down2_lsr_medium_4s": 3513651044, + "cmp_rational_icount_down2_r8b_eco": 194127512, + "cmp_rational_icount_down2_r8b_eco_4s": 372389293, + "cmp_rational_icount_down2_r8b_tr": 247718943, + "cmp_rational_icount_down2_r8b_tr_4s": 479303929, + "cmp_rational_icount_down2_speex_fixed_q3": 54603931, + "cmp_rational_icount_down2_speex_fixed_q3_4s": 92735550, + "cmp_rational_icount_down2_speex_float_q2": 52592581, + "cmp_rational_icount_down2_speex_float_q2_4s": 89488132, + "cmp_rational_icount_down2_speex_float_q9": 1161076558, + "cmp_rational_icount_down2_speex_float_q9_4s": 2306070199, + "cmp_rational_icount_down2_srt_eco_float": 132869564, + "cmp_rational_icount_down2_srt_eco_float_4s": 250042099, + "cmp_rational_icount_down2_srt_eco_q15": 33684380, + "cmp_rational_icount_down2_srt_eco_q15_4s": 50926054, + "cmp_rational_icount_down2_srt_tr_float": 285336234, + "cmp_rational_icount_down2_srt_tr_float_4s": 554840242, + "cmp_rational_icount_r23_lsr_best": 2566699998, + "cmp_rational_icount_r23_lsr_best_4s": 5131131402, + "cmp_rational_icount_r23_lsr_medium": 857993032, + "cmp_rational_icount_r23_lsr_medium_4s": 1708751121, + "cmp_rational_icount_r23_r8b_eco": 219109494, + "cmp_rational_icount_r23_r8b_eco_4s": 430109933, + "cmp_rational_icount_r23_r8b_tr": 227094057, + "cmp_rational_icount_r23_r8b_tr_4s": 445478726, + "cmp_rational_icount_r23_speex_fixed_q3": 26557670, + "cmp_rational_icount_r23_speex_fixed_q3_4s": 44759379, + "cmp_rational_icount_r23_speex_float_q2": 24909105, + "cmp_rational_icount_r23_speex_float_q2_4s": 41884914, + "cmp_rational_icount_r23_speex_float_q9": 571022592, + "cmp_rational_icount_r23_speex_float_q9_4s": 1133564443, + "cmp_rational_icount_r23_srt_eco_float": 115727396, + "cmp_rational_icount_r23_srt_eco_float_4s": 223517236, + "cmp_rational_icount_r23_srt_eco_q15": 19221969, + "cmp_rational_icount_r23_srt_eco_q15_4s": 30131593, + "cmp_rational_icount_r23_srt_tr_float": 276221540, + "cmp_rational_icount_r23_srt_tr_float_4s": 544303452, + "cmp_rational_icount_r32_lsr_best": 2653338515, + "cmp_rational_icount_r32_lsr_best_4s": 5307218633, + "cmp_rational_icount_r32_lsr_medium": 895200802, + "cmp_rational_icount_r32_lsr_medium_4s": 1785801077, + "cmp_rational_icount_r32_r8b_eco": 214370104, + "cmp_rational_icount_r32_r8b_eco_4s": 423223299, + "cmp_rational_icount_r32_r8b_tr": 221375760, + "cmp_rational_icount_r32_r8b_tr_4s": 436638200, + "cmp_rational_icount_r32_speex_fixed_q3": 22183650, + "cmp_rational_icount_r32_speex_fixed_q3_4s": 38734292, + "cmp_rational_icount_r32_speex_float_q2": 18287116, + "cmp_rational_icount_r32_speex_float_q2_4s": 31237725, + "cmp_rational_icount_r32_speex_float_q9": 552021685, + "cmp_rational_icount_r32_speex_float_q9_4s": 1098159247, + "cmp_rational_icount_r32_srt_eco_float": 79829651, + "cmp_rational_icount_r32_srt_eco_float_4s": 154319110, + "cmp_rational_icount_r32_srt_eco_q15": 15469369, + "cmp_rational_icount_r32_srt_eco_q15_4s": 25349959, + "cmp_rational_icount_r32_srt_tr_float": 181109993, + "cmp_rational_icount_r32_srt_tr_float_4s": 356681821, + "cmp_rational_icount_up2_lsr_best": 5377169957, + "cmp_rational_icount_up2_lsr_best_4s": 10754355102, + "cmp_rational_icount_up2_lsr_medium": 1807944466, + "cmp_rational_icount_up2_lsr_medium_4s": 3608919068, + "cmp_rational_icount_up2_r8b_eco": 186909444, + "cmp_rational_icount_up2_r8b_eco_4s": 365761132, + "cmp_rational_icount_up2_r8b_tr": 239772753, + "cmp_rational_icount_up2_r8b_tr_4s": 471220736, + "cmp_rational_icount_up2_speex_fixed_q3": 40043673, + "cmp_rational_icount_up2_speex_fixed_q3_4s": 71781476, + "cmp_rational_icount_up2_speex_float_q2": 32893981, + "cmp_rational_icount_up2_speex_float_q2_4s": 57887828, + "cmp_rational_icount_up2_speex_float_q9": 1092549531, + "cmp_rational_icount_up2_speex_float_q9_4s": 2176813380, + "cmp_rational_icount_up2_srt_eco_float": 123951239, + "cmp_rational_icount_up2_srt_eco_float_4s": 239998901, + "cmp_rational_icount_up2_srt_eco_q15": 25053727, + "cmp_rational_icount_up2_srt_eco_q15_4s": 41833194, + "cmp_rational_icount_up2_srt_tr_float": 275710956, + "cmp_rational_icount_up2_srt_tr_float_4s": 543381015 }, "m33": { "cmp_rational_icount_down2_lsr_best": 24825748900, @@ -105,12 +105,12 @@ "cmp_rational_icount_down2_speex_float_q2_4s": 193683838, "cmp_rational_icount_down2_speex_float_q9": 6300597469, "cmp_rational_icount_down2_speex_float_q9_4s": 12554993158, - "cmp_rational_icount_down2_srt_eco_float": 747212270, - "cmp_rational_icount_down2_srt_eco_float_4s": 1447181617, - "cmp_rational_icount_down2_srt_eco_q15": 102304133, - "cmp_rational_icount_down2_srt_eco_q15_4s": 152133592, - "cmp_rational_icount_down2_srt_tr_float": 1945920670, - "cmp_rational_icount_down2_srt_tr_float_4s": 3843670231, + "cmp_rational_icount_down2_srt_eco_float": 685702695, + "cmp_rational_icount_down2_srt_eco_float_4s": 1324186237, + "cmp_rational_icount_down2_srt_eco_q15": 90085899, + "cmp_rational_icount_down2_srt_eco_q15_4s": 127731295, + "cmp_rational_icount_down2_srt_tr_float": 1577446929, + "cmp_rational_icount_down2_srt_tr_float_4s": 3106917549, "cmp_rational_icount_r23_lsr_best": 14284492339, "cmp_rational_icount_r23_lsr_best_4s": 28579281236, "cmp_rational_icount_r23_lsr_medium": 4704880682, @@ -125,12 +125,12 @@ "cmp_rational_icount_r23_speex_float_q2_4s": 97967922, "cmp_rational_icount_r23_speex_float_q9": 3261551726, "cmp_rational_icount_r23_speex_float_q9_4s": 6498935121, - "cmp_rational_icount_r23_srt_eco_float": 596297750, - "cmp_rational_icount_r23_srt_eco_float_4s": 1168475930, - "cmp_rational_icount_r23_srt_eco_q15": 63569054, - "cmp_rational_icount_r23_srt_eco_q15_4s": 100360325, - "cmp_rational_icount_r23_srt_tr_float": 1320719642, - "cmp_rational_icount_r23_srt_tr_float_4s": 2616045438, + "cmp_rational_icount_r23_srt_eco_float": 538336941, + "cmp_rational_icount_r23_srt_eco_float_4s": 1052588017, + "cmp_rational_icount_r23_srt_eco_q15": 47967151, + "cmp_rational_icount_r23_srt_eco_q15_4s": 69205042, + "cmp_rational_icount_r23_srt_tr_float": 1310012915, + "cmp_rational_icount_r23_srt_tr_float_4s": 2594612321, "cmp_rational_icount_r32_lsr_best": 13372485364, "cmp_rational_icount_r32_lsr_best_4s": 26761149512, "cmp_rational_icount_r32_lsr_medium": 4435070409, @@ -145,12 +145,12 @@ "cmp_rational_icount_r32_speex_float_q2_4s": 90159919, "cmp_rational_icount_r32_speex_float_q9": 3223060417, "cmp_rational_icount_r32_speex_float_q9_4s": 6429739837, - "cmp_rational_icount_r32_srt_eco_float": 469326407, - "cmp_rational_icount_r32_srt_eco_float_4s": 922379277, - "cmp_rational_icount_r32_srt_eco_q15": 51863286, - "cmp_rational_icount_r32_srt_eco_q15_4s": 85648910, - "cmp_rational_icount_r32_srt_tr_float": 1030075097, - "cmp_rational_icount_r32_srt_tr_float_4s": 2042649670, + "cmp_rational_icount_r32_srt_eco_float": 423917130, + "cmp_rational_icount_r32_srt_eco_float_4s": 831590300, + "cmp_rational_icount_r32_srt_eco_q15": 37803672, + "cmp_rational_icount_r32_srt_eco_q15_4s": 57574704, + "cmp_rational_icount_r32_srt_tr_float": 1019733628, + "cmp_rational_icount_r32_srt_tr_float_4s": 2021945882, "cmp_rational_icount_up2_lsr_best": 24993163293, "cmp_rational_icount_up2_lsr_best_4s": 50002861064, "cmp_rational_icount_up2_lsr_medium": 8191850089, @@ -165,12 +165,12 @@ "cmp_rational_icount_up2_speex_float_q2_4s": 169676148, "cmp_rational_icount_up2_speex_float_q9": 6369476999, "cmp_rational_icount_up2_speex_float_q9_4s": 12716278483, - "cmp_rational_icount_up2_srt_eco_float": 718911300, - "cmp_rational_icount_up2_srt_eco_float_4s": 1413988665, - "cmp_rational_icount_up2_srt_eco_q15": 82395497, - "cmp_rational_icount_up2_srt_eco_q15_4s": 138295617, - "cmp_rational_icount_up2_srt_tr_float": 1917225952, - "cmp_rational_icount_up2_srt_tr_float_4s": 3809671453 + "cmp_rational_icount_up2_srt_eco_float": 650221233, + "cmp_rational_icount_up2_srt_eco_float_4s": 1276634667, + "cmp_rational_icount_up2_srt_eco_q15": 60868960, + "cmp_rational_icount_up2_srt_eco_q15_4s": 95298765, + "cmp_rational_icount_up2_srt_tr_float": 1541740301, + "cmp_rational_icount_up2_srt_tr_float_4s": 3058900687 }, "m55": { "cmp_rational_icount_down2_lsr_best": 1203411231, @@ -187,12 +187,12 @@ "cmp_rational_icount_down2_speex_float_q2_4s": 111822003, "cmp_rational_icount_down2_speex_float_q9": 441333205, "cmp_rational_icount_down2_speex_float_q9_4s": 879789256, - "cmp_rational_icount_down2_srt_eco_float": 50926746, - "cmp_rational_icount_down2_srt_eco_float_4s": 99040035, - "cmp_rational_icount_down2_srt_eco_q15": 39419192, - "cmp_rational_icount_down2_srt_eco_q15_4s": 75817375, - "cmp_rational_icount_down2_srt_tr_float": 97740859, - "cmp_rational_icount_down2_srt_tr_float_4s": 192643058, + "cmp_rational_icount_down2_srt_eco_float": 46674386, + "cmp_rational_icount_down2_srt_eco_float_4s": 90537231, + "cmp_rational_icount_down2_srt_eco_q15": 33681206, + "cmp_rational_icount_down2_srt_eco_q15_4s": 64343242, + "cmp_rational_icount_down2_srt_tr_float": 81773430, + "cmp_rational_icount_down2_srt_tr_float_4s": 160716142, "cmp_rational_icount_r23_lsr_best": 605582307, "cmp_rational_icount_r23_lsr_best_4s": 1210835922, "cmp_rational_icount_r23_lsr_medium": 205736421, @@ -207,12 +207,12 @@ "cmp_rational_icount_r23_speex_float_q2_4s": 58080368, "cmp_rational_icount_r23_speex_float_q9": 221494625, "cmp_rational_icount_r23_speex_float_q9_4s": 441470522, - "cmp_rational_icount_r23_srt_eco_float": 34914810, - "cmp_rational_icount_r23_srt_eco_float_4s": 68404717, - "cmp_rational_icount_r23_srt_eco_q15": 23583741, - "cmp_rational_icount_r23_srt_eco_q15_4s": 45625755, - "cmp_rational_icount_r23_srt_tr_float": 67602516, - "cmp_rational_icount_r23_srt_tr_float_4s": 133750224, + "cmp_rational_icount_r23_srt_eco_float": 30202364, + "cmp_rational_icount_r23_srt_eco_float_4s": 58981953, + "cmp_rational_icount_r23_srt_eco_q15": 14282236, + "cmp_rational_icount_r23_srt_eco_q15_4s": 27038179, + "cmp_rational_icount_r23_srt_tr_float": 65195490, + "cmp_rational_icount_r23_srt_tr_float_4s": 128936775, "cmp_rational_icount_r32_lsr_best": 611836503, "cmp_rational_icount_r32_lsr_best_4s": 1223828488, "cmp_rational_icount_r32_lsr_medium": 211594118, @@ -227,12 +227,12 @@ "cmp_rational_icount_r32_speex_float_q2_4s": 60131378, "cmp_rational_icount_r32_speex_float_q9": 221759347, "cmp_rational_icount_r32_speex_float_q9_4s": 442465392, - "cmp_rational_icount_r32_srt_eco_float": 27019266, - "cmp_rational_icount_r32_srt_eco_float_4s": 53079278, - "cmp_rational_icount_r32_srt_eco_q15": 20919794, - "cmp_rational_icount_r32_srt_eco_q15_4s": 40794843, - "cmp_rational_icount_r32_srt_tr_float": 48718410, - "cmp_rational_icount_r32_srt_tr_float_4s": 96447791, + "cmp_rational_icount_r32_srt_eco_float": 23573327, + "cmp_rational_icount_r32_srt_eco_float_4s": 46189313, + "cmp_rational_icount_r32_srt_eco_q15": 15147792, + "cmp_rational_icount_r32_srt_eco_q15_4s": 29261572, + "cmp_rational_icount_r32_srt_tr_float": 46817484, + "cmp_rational_icount_r32_srt_tr_float_4s": 92647042, "cmp_rational_icount_up2_lsr_best": 1219916195, "cmp_rational_icount_up2_lsr_best_4s": 2439982008, "cmp_rational_icount_up2_lsr_medium": 419178916, @@ -247,12 +247,12 @@ "cmp_rational_icount_up2_speex_float_q2_4s": 117830238, "cmp_rational_icount_up2_speex_float_q9": 441694954, "cmp_rational_icount_up2_speex_float_q9_4s": 881909062, - "cmp_rational_icount_up2_srt_eco_float": 45518445, - "cmp_rational_icount_up2_srt_eco_float_4s": 89619547, - "cmp_rational_icount_up2_srt_eco_q15": 37776343, - "cmp_rational_icount_up2_srt_eco_q15_4s": 74020838, - "cmp_rational_icount_up2_srt_tr_float": 91977914, - "cmp_rational_icount_up2_srt_tr_float_4s": 182513721 + "cmp_rational_icount_up2_srt_eco_float": 38201508, + "cmp_rational_icount_up2_srt_eco_float_4s": 74987550, + "cmp_rational_icount_up2_srt_eco_q15": 27279107, + "cmp_rational_icount_up2_srt_eco_q15_4s": 53039721, + "cmp_rational_icount_up2_srt_tr_float": 73040786, + "cmp_rational_icount_up2_srt_tr_float_4s": 144646506 } } } diff --git a/rational/docs/COMPARISON.md b/rational/docs/COMPARISON.md index 256c38c..a82c4b9 100644 --- a/rational/docs/COMPARISON.md +++ b/rational/docs/COMPARISON.md @@ -153,12 +153,13 @@ settings are 13× (SpeexDSP) to 180–245× (`CDSPResampler24`). ## Computational cost, identical conditions -The host and embedded cost tables below were measured on `667934a` -(2026-10-10), before X17 re-tuned `rational`'s designer (2026-11-20). The -designs it ships since are shorter — the by-2 stage at `economy` 21 MACs -per output against 23, at `transparent` 51 against 63; `bench/baselines.json` -records the instruction counts that moved — so the `rational` rows here are -the longer designs' until `compare.yml` is re-run and re-harvested. +The embedded instruction counts below were measured after X17 re-tuned +`rational`'s designer (2026-11-20), in `compare.yml` run 45540985569 on +`f1816cc` (2026-11-25). The host wall-clock table was measured on `667934a` +(2026-10-10), before X17: the designs shipped since are shorter — the by-2 +stage at `economy` 21 MACs per output against 23, at `transparent` 51 +against 63 — so its `rational` rows are the longer designs' until the host +comparison bench is re-run. Same engines, same task: convert a float 997 Hz stereo stream at exactly 2/1, 1/2, 3/2 or 2/3, streaming in 128-frame input blocks (`bench/compare/`, @@ -241,9 +242,9 @@ cross-compiled here. Measured in `compare.yml` run -[38013347369](https://github.com/tap/SampleRateTap/actions/runs/38013347369) -on `667934a` (DspTap `d7ebe4b`), 2026-10-10; arm-none-eabi-gcc 15:13.2.rel1-2, -qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261004.327.1), +[45540985569](https://github.com/tap/SampleRateTap/actions/runs/45540985569) +on `f1816cc` (DspTap `4b30a02`), 2026-11-25; arm-none-eabi-gcc 15:13.2.rel1-2, +qemu-system-arm 1:8.2.2+ds-0ubuntu1.18 (ubuntu24 20261116.376.1), hexagon-clang 19.1.5 and qemu-hexagon 8.2.2 at the pinned digests. **↑2 (48 → 96 kHz).** Steady state, instructions per stereo output frame (× = vs. the @@ -251,24 +252,24 @@ rational row the label names; the cheapest rational row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 230 | 3,620 | 677 | -| **rational** economy, Q15 | **189** | **291** | **103** | -| **rational** transparent, float | 472 | 9,856 | 1,732 | -| libsamplerate `MEDIUM` (economy-matched) | 2,177 (9.5×) | 42,566 (11.8×) | 9,380 (13.9×) | -| r8brain 70 dB, 16 % band (economy-matched)³ | 203 (0.9×) | 4,479 (1.2×) | 932 (1.4×) | -| SpeexDSP float, quality 2 (economy-matched) | 303 (1.3×) | 380 (0.1×) | 130 (0.2×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 488 (2.6×) | 571 (2.0×) | 165 (1.6×) | -| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,355 (13.5×) | 130,259 (13.2×) | 28,006 (16.2×) | -| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 241 (0.5×) | 5,875 (0.6×) | 1,205 (0.7×) | -| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 2,293 (4.9×) | 33,056 (3.4×) | 5,647 (3.3×) | +| **rational** economy, float | 192 | 3,263 | 604 | +| **rational** economy, Q15 | **134** | **179** | **87** | +| **rational** transparent, float | 373 | 7,902 | 1,394 | +| libsamplerate `MEDIUM` (economy-matched) | 2,177 (11.4×) | 42,566 (13.0×) | 9,380 (15.5×) | +| r8brain 70 dB, 16 % band (economy-matched)³ | 203 (1.1×) | 4,479 (1.4×) | 932 (1.5×) | +| SpeexDSP float, quality 2 (economy-matched) | 303 (1.6×) | 380 (0.1×) | 130 (0.2×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 488 (3.6×) | 571 (3.2×) | 165 (1.9×) | +| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,355 (17.0×) | 130,259 (16.5×) | 28,006 (20.1×) | +| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 241 (0.6×) | 5,875 (0.7×) | 1,205 (0.9×) | +| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 2,293 (6.1×) | 33,056 (4.2×) | 5,647 (4.1×) | One-time construction, millions of instructions: | Engine | Cortex-M55 | Cortex-M33 | Hexagon | |---|---:|---:|---:| | **rational** economy, float | 1.4 | 23.8 | 7.9 | -| **rational** economy, Q15 | 1.5 | 26.5 | 8.3 | -| **rational** transparent, float | 1.4 | 24.8 | 8.1 | +| **rational** economy, Q15 | 1.5 | 26.4 | 8.3 | +| **rational** transparent, float | 1.4 | 24.6 | 8.0 | | libsamplerate `MEDIUM` (economy-matched) | 1.3 | 19.2 | 7.0 | | r8brain 70 dB, 16 % band (economy-matched) | 1.4 | 24.2 | 8.1 | | SpeexDSP float, quality 2 (economy-matched) | 1.4 | 23.6 | 7.9 | @@ -282,24 +283,24 @@ rational row the label names; the cheapest rational row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 501 | 7,291 | 1,350 | -| **rational** economy, Q15 | **379** | **519** | **214** | -| **rational** transparent, float | 989 | 19,768 | 3,469 | -| libsamplerate `MEDIUM` (economy-matched) | 4,174 (8.3×) | 83,674 (11.5×) | 18,223 (13.5×) | -| r8brain 70 dB, 16 % band (economy-matched)³ | 399 (0.8×) | 8,897 (1.2×) | 1,857 (1.4×) | -| SpeexDSP float, quality 2 (economy-matched) | 568 (1.1×) | 764 (0.1×) | 384 (0.3×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 915 (2.4×) | 1,111 (2.1×) | 397 (1.9×) | -| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 12,522 (12.7×) | 258,524 (13.1×) | 55,473 (16.0×) | -| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 474 (0.5×) | 11,709 (0.6×) | 2,412 (0.7×) | -| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 4,567 (4.6×) | 65,150 (3.3×) | 11,927 (3.4×) | +| **rational** economy, float | 457 | 6,651 | 1,221 | +| **rational** economy, Q15 | **319** | **392** | **180** | +| **rational** transparent, float | 822 | 15,932 | 2,807 | +| libsamplerate `MEDIUM` (economy-matched) | 4,174 (9.1×) | 83,674 (12.6×) | 18,223 (14.9×) | +| r8brain 70 dB, 16 % band (economy-matched)³ | 399 (0.9×) | 8,897 (1.3×) | 1,857 (1.5×) | +| SpeexDSP float, quality 2 (economy-matched) | 568 (1.2×) | 764 (0.1×) | 384 (0.3×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 915 (2.9×) | 1,111 (2.8×) | 397 (2.2×) | +| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 12,522 (15.2×) | 258,524 (16.2×) | 55,473 (19.8×) | +| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 474 (0.6×) | 11,709 (0.7×) | 2,412 (0.9×) | +| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 4,567 (5.6×) | 65,150 (4.1×) | 11,927 (4.2×) | One-time construction, millions of instructions: | Engine | Cortex-M55 | Cortex-M33 | Hexagon | |---|---:|---:|---:| | **rational** economy, float | 2.8 | 47.2 | 15.7 | -| **rational** economy, Q15 | 3.0 | 52.5 | 16.5 | -| **rational** transparent, float | 2.8 | 48.2 | 15.9 | +| **rational** economy, Q15 | 3.0 | 52.4 | 16.4 | +| **rational** transparent, float | 2.8 | 48.0 | 15.8 | | libsamplerate `MEDIUM` (economy-matched) | 2.7 | 42.8 | 14.8 | | r8brain 70 dB, 16 % band (economy-matched) | 2.8 | 47.7 | 15.9 | | SpeexDSP float, quality 2 (economy-matched) | 2.8 | 47.1 | 15.7 | @@ -313,23 +314,23 @@ rational row the label names; the cheapest rational row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 271 | 4,719 | 867 | -| **rational** economy, Q15 | **207** | **352** | **120** | -| **rational** transparent, float | 497 | 10,548 | 1,848 | -| libsamplerate `MEDIUM` (economy-matched) | 2,195 (8.1×) | 46,071 (9.8×) | 9,277 (10.7×) | -| r8brain 70 dB, 16 % band (economy-matched)³ | 438 (1.6×) | 10,247 (2.2×) | 2,176 (2.5×) | -| SpeexDSP float, quality 2 (economy-matched) | 308 (1.1×) | 386 (0.1×) | 135 (0.2×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 493 (2.4×) | 577 (1.6×) | 172 (1.4×) | -| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,375 (12.8×) | 139,465 (13.2×) | 27,645 (15.0×) | -| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 408 (0.8×) | 10,944 (1.0×) | 2,242 (1.2×) | -| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 2,299 (4.6×) | 33,403 (3.2×) | 5,689 (3.1×) | +| **rational** economy, float | 236 | 4,247 | 776 | +| **rational** economy, Q15 | **147** | **206** | **103** | +| **rational** transparent, float | 477 | 10,440 | 1,829 | +| libsamplerate `MEDIUM` (economy-matched) | 2,195 (9.3×) | 46,071 (10.8×) | 9,277 (12.0×) | +| r8brain 70 dB, 16 % band (economy-matched)³ | 438 (1.9×) | 10,247 (2.4×) | 2,176 (2.8×) | +| SpeexDSP float, quality 2 (economy-matched) | 308 (1.3×) | 386 (0.1×) | 135 (0.2×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 493 (3.4×) | 577 (2.8×) | 172 (1.7×) | +| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 6,375 (13.4×) | 139,465 (13.4×) | 27,645 (15.1×) | +| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 408 (0.9×) | 10,944 (1.0×) | 2,242 (1.2×) | +| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 2,299 (4.8×) | 33,403 (3.2×) | 5,689 (3.1×) | One-time construction, millions of instructions: | Engine | Cortex-M55 | Cortex-M33 | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 1.0 | 16.3 | 5.4 | -| **rational** economy, Q15 | 1.0 | 18.1 | 5.6 | +| **rational** economy, float | 1.0 | 16.2 | 5.3 | +| **rational** economy, Q15 | 1.0 | 18.0 | 5.6 | | **rational** transparent, float | 1.0 | 17.5 | 5.5 | | libsamplerate `MEDIUM` (economy-matched) | 0.9 | 12.3 | 4.6 | | r8brain 70 dB, 16 % band (economy-matched) | 1.0 | 16.7 | 5.5 | @@ -344,23 +345,23 @@ rational row the label names; the cheapest rational row per target in bold): | Engine | Cortex-M55 | Cortex-M33 (Pico 2 class) | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 523 | 8,940 | 1,861 | -| **rational** economy, Q15 | **344** | **575** | **182** | -| **rational** transparent, float | 1,034 | 20,239 | 4,214 | -| libsamplerate `MEDIUM` (economy-matched) | 3,194 (6.1×) | 73,202 (8.2×) | 13,293 (7.1×) | -| r8brain 70 dB, 16 % band (economy-matched)³ | 684 (1.3×) | 16,307 (1.8×) | 3,297 (1.8×) | -| SpeexDSP float, quality 2 (economy-matched) | 443 (0.8×) | 579 (0.1×) | 265 (0.1×) | -| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 709 (2.1×) | 849 (1.5×) | 284 (1.6×) | -| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 9,457 (9.2×) | 223,356 (11.0×) | 40,069 (9.5×) | -| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 640 (0.6×) | 17,174 (0.8×) | 3,412 (0.8×) | -| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 3,437 (3.3×) | 50,584 (2.5×) | 8,790 (2.1×) | +| **rational** economy, float | 450 | 8,035 | 1,684 | +| **rational** economy, Q15 | **199** | **332** | **170** | +| **rational** transparent, float | 996 | 20,072 | 4,189 | +| libsamplerate `MEDIUM` (economy-matched) | 3,194 (7.1×) | 73,202 (9.1×) | 13,293 (7.9×) | +| r8brain 70 dB, 16 % band (economy-matched)³ | 684 (1.5×) | 16,307 (2.0×) | 3,297 (2.0×) | +| SpeexDSP float, quality 2 (economy-matched) | 443 (1.0×) | 579 (0.1×) | 265 (0.2×) | +| SpeexDSP fixed-point, quality 3 (× vs. Q15) | 709 (3.6×) | 849 (2.6×) | 284 (1.7×) | +| libsamplerate `BEST` (transparent-matched; × vs. transparent) | 9,457 (9.5×) | 223,356 (11.1×) | 40,069 (9.6×) | +| r8brain 120 dB, 10 % band (transparent-matched; × vs. transparent)³ | 640 (0.6×) | 17,174 (0.9×) | 3,412 (0.8×) | +| SpeexDSP float, quality 9 (transparent-matched; × vs. transparent) | 3,437 (3.5×) | 50,584 (2.5×) | 8,790 (2.1×) | One-time construction, millions of instructions: | Engine | Cortex-M55 | Cortex-M33 | Hexagon | |---|---:|---:|---:| -| **rational** economy, float | 1.4 | 24.1 | 8.0 | -| **rational** economy, Q15 | 1.5 | 26.8 | 8.3 | +| **rational** economy, float | 1.4 | 24.1 | 7.9 | +| **rational** economy, Q15 | 1.5 | 26.7 | 8.3 | | **rational** transparent, float | 1.5 | 25.4 | 8.1 | | libsamplerate `MEDIUM` (economy-matched) | 1.3 | 19.9 | 7.2 | | r8brain 70 dB, 16 % band (economy-matched) | 1.4 | 24.5 | 8.1 | @@ -370,45 +371,46 @@ One-time construction, millions of instructions: | r8brain 120 dB, 10 % band (transparent-matched) | 1.5 | 27.1 | 8.7 | | SpeexDSP float, quality 9 (transparent-matched) | 1.5 | 24.2 | 8.5 | -Key figures (↓2, 96 → 48): on the M33 the economy Q15 half-band costs **519 +Key figures (↓2, 96 → 48): on the M33 the economy Q15 half-band costs **392 instructions/frame** in steady state, SpeexDSP's fixed-point build at quality -3 **2.1×** that, libsamplerate `MEDIUM` **~161×** and r8brain at 70 dB -**~17×**; on the M55 the economy float half-band (501) is dearer than Q15 -(379) by 32%. +3 **2.8×** that, libsamplerate `MEDIUM` **~213×** and r8brain at 70 dB +**~23×**; on the M55 the economy float half-band (457) is dearer than Q15 +(319) by 43%. **The Q15 stage is the cheapest row at every ratio on every target.** -Economy in Q15 costs 189–379 instructions per stereo output frame on the -M55, 291–575 on the M33 and 103–214 on Hexagon: the half-band's structural -zeros are never multiplied (23 MACs of its 43 taps going down) and the +Economy in Q15 costs 134–319 instructions per stereo output frame on the +M55, 179–392 on the M33 and 87–180 on Hexagon: the half-band's structural +zeros are never multiplied (21 MACs of its 39 taps going down) and the Helium dot takes the rest. Against it, SpeexDSP's fixed-point build at quality 3 — the one competitor that runs on the Q15 row's terms — costs -1.4–2.6×, and the float libraries are a different order: r8brain's -economy-matched setting 17–31× on the M33, libsamplerate `MEDIUM` 130–160×. +1.7–3.6×, and the float libraries are a different order: r8brain's +economy-matched setting 23–50× on the M33, libsamplerate `MEDIUM` 210–240×. **In float the Nyquist stage holds its own against r8brain's FFT, which `bridge`'s 58-tap polyphase did not.** r8brain's economy-matched setting -costs 0.8–0.9× `economy` on the M55 at the by-2 pair, where its block -convolution amortizes best, and 1.2–2.5× everywhere else: 1.2–1.4× on the -soft-double M33 and Hexagon at by 2, 1.3–2.5× at the mixed pair on every +costs 0.9–1.1× `economy` on the M55 at the by-2 pair, where its block +convolution amortizes best, and 1.3–2.8× everywhere else: 1.3–1.5× on the +soft-double M33 and Hexagon at by 2, 1.5–2.8× at the mixed pair on every target, where r8brain's two-stage structure for 3/2 and 2/3 costs it. At -`transparent` r8brain is 0.5–0.8× at by 2 and 0.8–1.2× at the mixed pair; -the short L-th-band designs (63–149 taps per branch at 120 dB) leave FFT -convolution less to win. libsamplerate `MEDIUM` costs 6–14× `economy` and its -`BEST` 9–16× `transparent`, consistently across targets. SpeexDSP's -single-precision float build at quality 2 costs 0.8–1.3× `economy` on the -M55 and, as in both sibling comparisons, undercuts the double-accumulating -float row by an order of magnitude on the soft-double targets while still -costing 1.4–2.6× the Q15 row; it is the one competitor row near `economy` -in cost and in stopband (70–76 dB), at 1.5× the latency. +`transparent` r8brain is 0.6–0.9× at by 2 and 0.6–1.2× at the mixed pair; +the short L-th-band designs (99 taps by 2 and 149 at the mixed pair at +120 dB) leave FFT convolution less to win. libsamplerate `MEDIUM` costs +7–16× `economy` and its `BEST` 10–20× `transparent`, consistently across +targets. SpeexDSP's single-precision float build at quality 2 costs +1.0–1.6× `economy` on the M55 and, as in both sibling comparisons, undercuts +the double-accumulating float row by an order of magnitude on the +soft-double targets while still costing 1.3–2.1× the Q15 row; it is the one +competitor row near `economy` in cost and in stopband (70–76 dB), at 1.5× +the latency. **Construction is a wash here, and mostly fixture.** Every row's one-time figure is within a few hundred thousand instructions of the others at the same ratio (1.0–3.0 M on the M55, 16–53 M on the M33), because the workload synthesizes its 0.25 s input fixture with libm `sin()` at the input rate and that is most of the 2 × (2 s) − (4 s) difference; `rational`'s own -design — one Kaiser prototype of 23–65 taps per branch — is the fraction of -a million above libsamplerate's row. The sibling engines' construction +design — one Kaiser prototype of 39 (by 2) to 59 (the mixed pair) taps — +is the fraction of a million above libsamplerate's row. The sibling engines' construction columns carry the same fixture and are dominated by their designs instead (`bridge` 98–437 M on the M33); a chain of stages pays this once per stage.