Skip to content

[bigint][bench] Refactor BigInt benches against Python and Rust#252

Merged
forfudan merged 6 commits into
mainfrom
dev
Jun 20, 2026
Merged

[bigint][bench] Refactor BigInt benches against Python and Rust#252
forfudan merged 6 commits into
mainfrom
dev

Conversation

@forfudan

@forfudan forfudan commented Jun 19, 2026

Copy link
Copy Markdown
Owner

This PR refactors the BigInt benchmarking infrastructure into a cross-language harness that compares decimo.BigInt (Mojo) against Python int (oracle) and Rust num-bigint (compiled peer), and adds a new BigInt performance/correctness planning document.

Changes:

  • Replaced the legacy interactive BigInt bench suite with a unified cross-language pipeline (benches/bigint/*) including a new Rust harness and a markdown report aggregator.
  • Updated benchmark dispatch/scripts and Pixi tasks to route bigint benches through the new pipeline and modernized report naming to include utc timestamps.
  • Added a BigInt enhancement plan document capturing baseline results, lessons learned, and prioritized future work.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the BigInt benchmarking infrastructure into a cross-language harness that compares decimo.BigInt (Mojo) against Python int (oracle) and Rust num-bigint (compiled peer), and adds a new BigInt performance/correctness planning document.

Changes:

  • Replaced the legacy interactive BigInt bench suite with a unified cross-language pipeline (benches/bigint/*) including a new Rust harness and a markdown report aggregator.
  • Updated benchmark dispatch/scripts and Pixi tasks to route bigint benches through the new pipeline and modernized report naming to include utc timestamps.
  • Added a BigInt enhancement plan document capturing baseline results, lessons learned, and prioritized future work.

Reviewed changes

Copilot reviewed 25 out of 33 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pixi.toml Updates bench/debug tasks to run the new BigInt Mojo harness entrypoint.
docs/plans/bigint_enhancement.md Adds a consolidated BigInt performance/correctness plan and baseline snapshot.
benches/run_bench.sh Routes bigint to the new cross-language runner and updates help text.
benches/decimal128/aggregate.py Renames default report output to include utc timestamp in filename.
benches/bigdecimal/aggregate.py Renames default report output to include utc timestamp in filename.
benches/bigint/run_all.sh New cross-language orchestrator (build/run mojo+python+rust, then aggregate).
benches/bigint/aggregate.py New BigInt CSV-log aggregator that emits side-by-side markdown reports.
benches/bigint/README.md Documents the new cross-language BigInt benchmark harness layout and usage.
benches/bigint/mojo/bench.mojo New Mojo-side BigInt benchmark runner emitting per-case CSV logs.
benches/bigint/python/bench.py New Python-side benchmark runner (oracle) emitting per-case CSV logs.
benches/bigint/rust/src/main.rs New Rust-side benchmark runner using num-bigint emitting per-case CSV logs.
benches/bigint/rust/Cargo.toml Adds Rust harness crate configuration and tuned release profile.
benches/bigint/.gitignore Ignores generated logs/reports and harness build artifacts.
benches/bigint/rust/.gitignore Ignores Rust target/ output for the harness.
benches/bigint/cases/*.toml Adds TOML case definitions for each BigInt op bench.
benches/bigint/bench*.mojo, benches/bigint/bench_data/truncate_divide.toml Removes legacy BigInt bench entrypoints/data superseded by the new harness.
Comments suppressed due to low confidence (1)

benches/run_bench.sh:29

  • Help output says omitting the operation gives an interactive menu for the type, but bigint now runs the cross-language pipeline when OP is omitted. This makes the help text inaccurate for bigint (and other cross-language types).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benches/bigint/rust/src/main.rs
Comment thread benches/bigint/aggregate.py Outdated
Comment thread benches/bigint/aggregate.py
Comment thread benches/bigint/aggregate.py
Comment thread benches/bigint/run_all.sh
Comment thread docs/plans/bigint_enhancement.md Outdated
@forfudan forfudan merged commit d14ac5d into main Jun 20, 2026
11 checks passed
@forfudan forfudan deleted the dev branch June 20, 2026 20:36
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.

2 participants