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

Speed up Duration deepcopy #1620

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Conversation

TimFelixBeyer
Copy link
Contributor

@TimFelixBeyer TimFelixBeyer commented Jun 26, 2023

Instead of updating the components during deepcopy (which is expensive), we can defer this update until it is actually needed and just copy the object for now. This speeds up tasks that use derivations (e.g. quantize) by up to 30% on my machine.

Instead of updating the components during deepcopy (which is expensive), we defer this update until it is actually needed and just copy the object for now. This speeds up tasks that use derivations (e.g. `quantize`) by up to 30% on my machine.
@coveralls
Copy link

Coverage Status

coverage: 92.991%. remained the same when pulling f8351de on TimFelixBeyer:patch-12 into f771fa7 on cuthbertLab:master.

@mscuthbert
Copy link
Member

Ah yes. That makes sense that the update would be slower than just doing a standard copy.

@mscuthbert mscuthbert merged commit 2d201aa into cuthbertLab:master Jun 26, 2023
@TimFelixBeyer TimFelixBeyer deleted the patch-12 branch June 28, 2023 00:27
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.

3 participants