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

simpler and faster deepcopy_internal for BigInt and BigFloat #41011

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

rfourquet
Copy link
Member

The speed improvement is probably not crucial though (in particular, deepcopy(::BigInt) is only marginally faster).

@rfourquet rfourquet added the bignums BigInt and BigFloat label May 30, 2021
@vtjnash
Copy link
Member

vtjnash commented May 31, 2021

This doesn't seem like it would make anything faster, though it seems perhaps a bit simpler?

@rfourquet
Copy link
Member Author

This doesn't seem like it would make anything faster, though it seems perhaps a bit simpler?

I'm not sure, deepcopy seems to become like 10ns faster (which is like 5% faster). The perf benefit is more visible when calling deepcopy_internal(x, dict) where x is already a key of dict, as then you don't need two lookups into dict.

@rfourquet rfourquet merged commit f262de8 into master Jun 8, 2021
@rfourquet rfourquet deleted the rf/big-deepcopy branch June 8, 2021 10:10
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bignums BigInt and BigFloat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants