Skip to content

Improve the implementation of Burnikel-Ziegler division#350

Merged
cuviper merged 2 commits into
rust-num:masterfrom
cuviper:bz-long-division
Jul 6, 2026
Merged

Improve the implementation of Burnikel-Ziegler division#350
cuviper merged 2 commits into
rust-num:masterfrom
cuviper:bz-long-division

Conversation

@cuviper

@cuviper cuviper commented Jul 6, 2026

Copy link
Copy Markdown
Member
  • Use a block size based on the divisor rather than the dividend
    • This corresponds to the paper's Algorithm 3
  • Normalize the divisor just once, avoiding the Knuth shifts as well

- Use a block size based on the divisor rather than the dividend
  - This corresponds to the paper's Algorithm 3
- Normalize the divisor just once, avoiding the Knuth shifts as well
@cuviper cuviper force-pushed the bz-long-division branch from d8efeb0 to 9be1ab7 Compare July 6, 2026 17:20
@cuviper

cuviper commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

I think there's still room to improve, especially avoiding allocations, but so far that's not showing up much in perf profiles. I guess it reduces to the smaller algorithms well enough, and otherwise it depends mostly on multiplication.

@cuviper cuviper added this pull request to the merge queue Jul 6, 2026
Merged via the queue into rust-num:master with commit 7310997 Jul 6, 2026
4 checks passed
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.

1 participant