-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] feat: cache len for container creation from expressions with length known at compile time #19503
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
Merged
Merged
[mypyc] feat: cache len for container creation from expressions with length known at compile time #19503
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
e81a5ce
feat: cache len for iterating over immutable types
BobTheBuidler 804c3b5
fix: tests
BobTheBuidler 33d64b3
fix: include bytes as sequence and fix test
BobTheBuidler 34c2244
rtypes
BobTheBuidler 58b18ee
Update for_helpers.py
BobTheBuidler aef2732
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3bd549c
Update for_helpers.py
BobTheBuidler 48a3671
Update specialize.py
BobTheBuidler 3f7ba01
Update irbuild-tuple.test
BobTheBuidler 74b89d8
Delete mypyc/test-data/fixtures/tuple.pyi
BobTheBuidler 05b6f53
feat: len only once
BobTheBuidler 4c95554
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 83ee9aa
Update for_helpers.py
BobTheBuidler d8dd01a
Update for_helpers.py
BobTheBuidler b16e023
Update for_helpers.py
BobTheBuidler 8f5f59e
Update for_helpers.py
BobTheBuidler a0f2ac0
Update for_helpers.py
BobTheBuidler 47f1d3f
Update for_helpers.py
BobTheBuidler bf7520a
Update irbuild-tuple.test
BobTheBuidler 558b1af
feat: handle star expr
BobTheBuidler 24c67d3
feat(test): test final and list
BobTheBuidler f09ef04
feat: propagate length of final strings
BobTheBuidler 0a0508b
feat(test): test containers from literal exprs
BobTheBuidler ed4239b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7eb67a3
Update for_helpers.py
BobTheBuidler e9f0451
Update for_helpers.py
BobTheBuidler 537c8af
feat(test): test stars
BobTheBuidler 888b971
Update for_helpers.py
BobTheBuidler 2b0cb4b
Update for_helpers.py
BobTheBuidler 6e57a9c
Merge branch 'master' into for-loop-len-cache
BobTheBuidler 9f2cc4b
Merge branch 'master' into for-loop-len-cache
BobTheBuidler 62dbc11
Update for_helpers.py
BobTheBuidler 99e44d3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b19ad91
Update irbuild-tuple.test
BobTheBuidler e2742e9
Update irbuild-tuple.test
BobTheBuidler b9317bc
Update irbuild-generics.test
BobTheBuidler 0869a2f
Update irbuild-tuple.test
BobTheBuidler 074b772
Merge branch 'master' into for-loop-len-cache
BobTheBuidler bec2e92
Update irbuild-tuple.test
BobTheBuidler 79e1009
Update irbuild-generics.test
BobTheBuidler 69bd43d
Merge branch 'master' into for-loop-len-cache
BobTheBuidler 1fa74d3
Merge branch 'master' into for-loop-len-cache
BobTheBuidler 29c62b3
Merge branch 'master' into for-loop-len-cache
BobTheBuidler 625929f
add run tests
BobTheBuidler 44244e0
Update run-tuples.test
BobTheBuidler 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 hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
These 2 helper functions can be extended to cover more cases and used for other length-based optimizations I have in mind