Skip to content

Integer roots binary search#5

Draft
evgunter wants to merge 1 commit into
mainfrom
cursor/integer-roots-binary-search-b938
Draft

Integer roots binary search#5
evgunter wants to merge 1 commit into
mainfrom
cursor/integer-roots-binary-search-b938

Conversation

@evgunter
Copy link
Copy Markdown
Owner

Add a new benchmark for integer root computation using binary search, including sequential and parallel versions, and configure Rayon's thread pool to mitigate a known bug.


Open in Cursor Open in Web

- Create benches/benchmarks.rs with Criterion benchmarks
- Implement integer_root(value, n) using binary search to compute floor(value^(1/n))
- Add checked_pow helper to handle overflow safely
- Include both sequential and parallel (rayon) benchmark variants
- Benchmark square root, cube root, and higher-order roots (4th-8th)
- Set ThreadPoolBuilder to 4 threads to work around known bug
- Add rayon and criterion dependencies to Cargo.toml

Co-authored-by: evan.gunter <evan.gunter@imbue.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Jan 16, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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