Skip to content

perf: profile pipeline and port scientific p_value formatting to Rust - #304

Open
ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:perf/profile-rust-hot-paths
Open

ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:perf/profile-rust-hot-paths

Conversation

@ArdaTkn

@ArdaTkn ArdaTkn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #267.

Summary

  • Profiled a 50,000-row build_graph_pipeline run against the release Rust extension (make build) and published the cost-center table and before/after benchmark in paper/benchmarks/pipeline_profile/README.md.
  • Ported lib.format_numeric()'s per-row Python {:.4e} formatting loop into tablassert.rs.format_scientific_4e (rust/src/lib.rs) using pre-sized buffers and rayon parallelism (py.detach) for batches >= 10,000 rows, achieving a 4.23x speedup on 100k floats (22.80 ms -> 5.39 ms median).
  • Added Rust unit test format_py_4e_matches_python_contract and Python golden parity tests in tests/test_format_numeric_golden.py (0 diffs across 2,014 edge and random floats + end-to-end lib.format_numeric parity).

Local gate

  • scripts/check_changelog.py --base upstream/main: PASS
  • ruff check . / ruff format --check src tests docs: clean
  • pyright: 0 errors
  • vulture / deptry .: clean
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings: clean
  • pytest tests/test_format_numeric_golden.py tests/test_cover_lib.py tests/test_docs_style.py: 37 passed

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 17b897b4-0932-4206-a7ce-afb0c3316d8b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ArdaTkn
ArdaTkn force-pushed the perf/profile-rust-hot-paths branch from b5c43a7 to 11f2757 Compare November 19, 2026 23:37

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile the build pipeline and move hot paths into the Rust extension

1 participant