Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mpq functions for Rational{BigInt} #38520

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Use mpq functions for Rational{BigInt} #38520

merged 3 commits into from
Nov 30, 2020

Conversation

simonbyrne
Copy link
Contributor

Fixes #9826.

A quick benchmark:

julia> X = [big(rand(1:10000)) // big(rand(1:10000)) for i = 1:100, j = 1:100];

julia> @time X*X; # before
 12.525924 seconds (45.29 M allocations: 1.267 GiB, 8.44% gc time)

julia> @time X*X; # after
  2.343117 seconds (18.95 M allocations: 733.016 MiB, 18.66% gc time, 17.26% compilation time)

base/gmp.jl Outdated Show resolved Hide resolved
base/gmp.jl Outdated Show resolved Hide resolved
base/gmp.jl Show resolved Hide resolved
@simonbyrne simonbyrne added domain:bignums BigInt and BigFloat domain:rationals The Rational type and values thereof labels Nov 30, 2020
@JeffBezanson JeffBezanson added the performance Must go faster label Nov 30, 2020
@JeffBezanson JeffBezanson merged commit 217a449 into master Nov 30, 2020
@JeffBezanson JeffBezanson deleted the sb/mpq branch November 30, 2020 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:bignums BigInt and BigFloat domain:rationals The Rational type and values thereof performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exploit mpq functions for Rational{BigInt}?
3 participants