-
Notifications
You must be signed in to change notification settings - Fork 39
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 marshal for save/load operators to improve performance #124
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0770e10
Merge pull request #1 from ProjectQ-Framework/develop
Spaceenter 892f38b
Merge pull request #3 from ProjectQ-Framework/develop
Spaceenter b4e5455
Merge pull request #4 from ProjectQ-Framework/develop
Spaceenter 0d97907
Merge pull request #5 from ProjectQ-Framework/develop
Spaceenter 33423b7
Merge pull request #6 from ProjectQ-Framework/develop
Spaceenter 305ee05
Merge pull request #7 from ProjectQ-Framework/develop
Spaceenter 43e7c53
Merge pull request #8 from ProjectQ-Framework/develop
Spaceenter 81e3d26
Merge pull request #9 from ProjectQ-Framework/develop
Spaceenter 9175595
Merge pull request #10 from ProjectQ-Framework/develop
Spaceenter 93b75c1
Merge pull request #11 from ProjectQ-Framework/develop
Spaceenter 746457b
Merge pull request #12 from ProjectQ-Framework/develop
Spaceenter 95a1666
Merge pull request #13 from ProjectQ-Framework/develop
Spaceenter a3e37e2
Merge pull request #14 from ProjectQ-Framework/develop
Spaceenter 169b523
Merge pull request #15 from ProjectQ-Framework/develop
Spaceenter ed6bd08
Merge pull request #16 from ProjectQ-Framework/develop
Spaceenter 10d8c1f
Merge pull request #17 from ProjectQ-Framework/develop
Spaceenter d7e57f2
Merge pull request #18 from ProjectQ-Framework/develop
Spaceenter a4bc785
Use marshal for save/load operators to improve performance
Spaceenter 978c365
...
Spaceenter ba224de
make it work with python3
Spaceenter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the dictionary parts you should still be able to use iterkeys and itervalues from future.utils! i.e.
iterkeys(tm)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at this:
https://stackoverflow.com/questions/10189273/for-a-python-dictionary-does-iterkeys-offer-any-advantages-over-viewkeys
Is it a style preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure actually - I actually thought that Python3's d.keys() was 2's d.iterkeys(). In fact I didn't know about viewkeys at all. It looks like both should work, but I know that future.utils.iterkeys passes tests for both 2 and 3 - it would be interesting to see if there's anything different with viewkeys, though I don't think we need any of its special properties like dynamic view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like tests for both 2 and 3 passed - should we go with this? Or do you want a change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine as is! If it's significantly slower I'll make another PR after this one gets through, but I doubt there'll be any issues.