Skip to content

v1.3.2

Latest

Choose a tag to compare

@kalicyh kalicyh released this 25 Nov 04:07
· 1 commit to master since this release

Decoder performance

The int16 and float decoders now copy the decoded PCM directly into the returned bytes. This removes per-sample Python conversions from the standard, multistream, and Projection decoders. The public API and output format are unchanged.

Benchmarks

The GitHub Actions benchmark used 20 ms stereo frames at 48 kHz on Ubuntu with libopus 1.6.1. The table shows median decode time per frame before and after, using PyPI 1.3.1 as the baseline. Performance run

Python int16 decode (µs/frame) float decode (µs/frame)
3.10 105.58 → 44.32 (−58%) 92.25 → 33.94 (−63%)
3.11 87.62 → 35.51 (−59%) 75.31 → 27.17 (−64%)
3.12 99.79 → 36.41 (−64%) 92.42 → 27.90 (−70%)
3.13 172.61 → 45.83 (−73%) 151.21 → 35.36 (−77%)
3.14 137.13 → 35.58 (−74%) 104.58 → 27.68 (−74%)

Encoding time varied by less than 1% across the matrix. In a separate macOS arm64 benchmark with Python 3.11 and libopus 1.6.1, six-channel multistream decode time decreased by 52–55% and four-channel Projection decode time decreased by 48–49%.

Benchmark tooling

Version comparisons now run in isolated Python processes and record the installed package version and import path in the results.