Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A basic performance test:
if name == 'main':
import time
Results:
copy.deepcopy()
0.5343360900878906
0.3827991485595703
0.335590124130249
0.3641550540924072
0.3552978038787842
0.39732789993286133
0.4047999382019043
0.35767602920532227
0.40660595893859863
0.3223540782928467
class
0.056986093521118164
0.04783987998962402
0.04845404624938965
0.043087005615234375
0.04816293716430664
0.051603078842163086
0.046478986740112305
0.044046878814697266
0.048792123794555664
0.05028414726257324