Skip to content

quality: Benchmark Rust ports against C on hot paths #142

Closed

Description

@zackees

There are no benchmarks. libobs builds C with IPO, but the Rust staticlib has no cross-language LTO, so calls that used to inline (bmalloc, dstr_*, vec*) are now opaque calls, and obs-graphics has no SIMD.

Work:

  • Criterion benches comparing each Rust shim with its C oracle: bmem, dstr (cat/printf/replace), vec2/3/4, crc32, the parsers.
  • A recorded baseline in the repo, and a documented threshold for the flip criteria.
  • Investigate cross-language LTO (-Clinker-plugin-lto with clang) for the ON build.

Activity

  1. added
    enhancement
    quality
    on Oct 10, 2026
  2. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Claiming: C/Rust performance comparison and flip evidence. 1. Add Criterion comparisons for the requested bmem, dstr cat/printf/replace, vec2/3/4, crc32, and parser shims against their real C oracles. 2. Record reproducible baseline measurements and apply the existing 10% release threshold. 3. Investigate clang cross-language LTO with an actual build probe and document the result. One benchmark/validation PR; no production port or workflow additions.

  3. added
    claimed
    on Oct 14, 2026
  4. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Completed by #668, merged as b479cec after the four local gate lanes and CI run 38498348374 passed. The repository now contains 70 paired Criterion comparisons, a five-run recorded baseline, the unchanged release thresholds, and a reproducible cross-language LTO investigation.

    The baseline exposes 21 medians over the performance bound; the release criteria explicitly block the default flip on those results. The LTO probe fails with a shared-library TLS relocation and is not enabled. Performance fixes and resolving the LTO compiler/linker failure remain separate work; the benchmark/evidence/investigation task is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimedenhancementquality

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions