Recursive AI

OneMedia subtitle speed rows, version 0.5 (x64)

All onemedia docs

One publishable run under the exclusive bench queue (wq run --class bench, one filtered group, subsbench 20000 100000, 30 samples), driven by tools/bench/subsbench-run.sh, on main 0794678 plus the ASS tuning commit described below. A first run before that change is described in the notes. Method: docs/bench.md.

Against the bar

Bar: geometric mean of the ratios <= 1.00x and no row worse than 1.25x, against the fastest managed comparator per row (ratio = OneMedia's median over that comparator's median).

RowSizes with a ratioGeomeanWorstVerdict
parse srt2/21.03×1.11×within the 1.25× row limit
parse vtt2/20.17×0.23×at the bar
parse ass2/20.95×1.21×within the 1.25× row limit
parse ttml2/20.50×0.62×at the bar
convert srt->vtt2/20.41×0.44×at the bar
convert srt->ass2/20.94×1.01×within the 1.25× row limit
convert srt->ttml2/20.16×0.18×at the bar
all 14 rows14/140.47×1.21×meets the bar

Notes

  • Rows are parse srt|vtt|ass|ttml and convert srt->vtt|ass|ttml at 20,000 and 100,000 cues, on the synthetic input and with the work described in docs/bench.md. The bar uses the fastest managed comparator per row, which is the Subtitle Edit core library wherever it has the format (SubtitlesParser has no TTML parser and no writers, and is the slowest on every row it has; its ASS reader returns 23,411 of the 100,000 cues).
  • OneMedia does more work than the comparators on every row (encoding and line-ending detection, styled spans, extras, defects with offsets, a loss report on conversion), which favours them.
  • The rows nearest the limit are parse srt (both sizes) and parse ass at 100,000 cues, where the median sits far above the minimum. At 100,000 cues a run allocates 54 to 110 MB (about 17 MB of it the decoded text) and the garbage collector's share is large; the median swings with the collector while the minimum does not (OneMedia's minimum is below the comparator's minimum on both ASS rows; on the SRT rows it is 1.1 to 1.2 times above). Median is the published figure.
  • One indicative tuning pass followed a first publishable run (job 1 of 2, same machine, same method, before the change) that had parse ass at 100,000 cues at 1.44× (median 78.67 ms against 54.65 ms) and parse srt at 100,000 cues at 1.20×, geomean 0.49×. The pass built the ASS override-tag buffer and its two delegates once per cue instead of once per override block (1.5 MB less allocation per 100,000-cue parse); output is unchanged (subsdump: 0 differences over 18,750 input/format lines of the testdata sidecars and 120 damaged variants of each; the subtitle tests pass). The second run, the one tabulated here, has parse ass at 1.21×. The allocation change is 2.4%, so most of that movement is run-to-run collector variance, not the change: treat the row as at the limit, not as comfortably inside it.
  • The load average before the run (5.33) is the one-minute average still decaying from the previous job; the machine ran nothing else during it (the exclusive queue).

Run

  • Machine: AMD Ryzen 9 7950X3D 16-Core Processor; 32 logical cores; Linux 7.0.0-38-generic x86_64
  • ISA: sse4.2 avx2 bmi2 avx512f avx512bw; the input is generated in memory, so storage is not in play
  • .NET: 10.0.13 runtime, SDK 10.0.402
  • Start 2026-11-02T14:09Z; elapsed 225 s; load average (1 min): before 5.33; during mean 2.36, max 5.33 over 45 samples (5 s samples); after 1.37
  • Comparators as restored: SubtitlesParser 1.5.1 (MIT), Subtitle Edit core library 5.3.0 (libse, GPL, public API only, bench project only)
  • 30 warm-up runs per implementation, then 30 samples in turn; median and minimum; one process; the bytes are in memory

Rows

Ratio is OneMedia's median over the fastest managed comparator's median. Alloc is bytes allocated per run by the calling thread. Result is what each run produced (cues parsed, or bytes written); SubtitlesParser's ASS reader returns 23,411 of 100,000 cues, so it is not the comparator there when it is slower anyway, and its row is information.

CuesRowImplementationMedianMinAlloc / runResultRatio to the fastest comparator
20,000parse srtonemedia4.28 ms3.76 ms10.5 MiB20,0000.96× (vs SubtitleEdit core)
20,000parse srtSubtitlesParser49.44 ms28.23 ms50.1 MiB20,00011.06×
20,000parse srtSubtitleEdit core4.47 ms3.24 ms13.2 MiB20,0001.00×
20,000parse vttonemedia3.80 ms3.57 ms11.1 MiB20,0000.13× (vs SubtitleEdit core)
20,000parse vttSubtitlesParser51.01 ms29.94 ms65.6 MiB20,0001.72×
20,000parse vttSubtitleEdit core29.69 ms15.79 ms34.8 MiB20,0001.00×
20,000parse assonemedia9.53 ms4.77 ms12.1 MiB20,0000.74× (vs SubtitleEdit core)
20,000parse assSubtitlesParser21.05 ms15.74 ms27.1 MiB20,0001.64×
20,000parse assSubtitleEdit core12.81 ms6.28 ms19.3 MiB20,0001.00×
20,000parse ttmlonemedia43.93 ms17.47 ms42.6 MiB20,0000.40× (vs SubtitleEdit core)
20,000parse ttmlSubtitleEdit core109.44 ms71.43 ms74.0 MiB20,0001.00×
20,000convert srt->vttonemedia10.81 ms6.26 ms19.6 MiB1,316,1330.44× (vs SubtitleEdit core)
20,000convert srt->vttSubtitleEdit core24.47 ms17.11 ms35.5 MiB1,316,1311.00×
20,000convert srt->assonemedia9.31 ms8.74 ms21.8 MiB1,724,2681.01× (vs SubtitleEdit core)
20,000convert srt->assSubtitleEdit core9.25 ms8.70 ms23.3 MiB1,740,0811.00×
20,000convert srt->ttmlonemedia19.28 ms14.21 ms26.9 MiB1,921,3390.14× (vs SubtitleEdit core)
20,000convert srt->ttmlSubtitleEdit core135.29 ms127.87 ms295.5 MiB2,282,6041.00×
100,000parse srtonemedia33.92 ms17.98 ms52.6 MiB100,0001.11× (vs SubtitleEdit core)
100,000parse srtSubtitlesParser352.84 ms293.65 ms311.6 MiB100,00011.50×
100,000parse srtSubtitleEdit core30.69 ms15.25 ms66.3 MiB100,0001.00×
100,000parse vttonemedia40.16 ms18.04 ms55.3 MiB100,0000.23× (vs SubtitleEdit core)
100,000parse vttSubtitlesParser269.56 ms226.69 ms327.1 MiB100,0001.57×
100,000parse vttSubtitleEdit core171.27 ms151.72 ms173.4 MiB100,0001.00×
100,000parse assonemedia61.18 ms24.41 ms59.9 MiB100,0001.21× (vs SubtitleEdit core)
100,000parse assSubtitlesParser170.37 ms131.61 ms149.3 MiB23,4113.38×
100,000parse assSubtitleEdit core50.41 ms38.44 ms96.4 MiB100,0001.00×
100,000parse ttmlonemedia303.24 ms221.86 ms210.9 MiB100,0000.62× (vs SubtitleEdit core)
100,000parse ttmlSubtitleEdit core493.02 ms453.28 ms368.7 MiB100,0001.00×
100,000convert srt->vttonemedia63.50 ms40.48 ms98.2 MiB6,586,4000.38× (vs SubtitleEdit core)
100,000convert srt->vttSubtitleEdit core166.50 ms140.76 ms177.7 MiB6,580,8671.00×
100,000convert srt->assonemedia63.05 ms54.17 ms106.3 MiB8,702,8350.88× (vs SubtitleEdit core)
100,000convert srt->assSubtitleEdit core71.35 ms58.77 ms116.5 MiB8,770,6361.00×
100,000convert srt->ttmlonemedia129.80 ms114.11 ms134.4 MiB9,608,5560.18× (vs SubtitleEdit core)
100,000convert srt->ttmlSubtitleEdit core706.80 ms660.08 ms1477.8 MiB11,446,5921.00×