GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [mypyc] Use bitsets in data-flow analyses by Jahongir-Qurbonov · Pull Request #22426 · python/mypy Conversation
Contributor
This PR represents the sets as
BenchmarkA function with n statements of this form: a{i} = xs[{i % 7}] + {i} if a{i}: t = a{i} Each analysis timed separately, then
Liveness is a bit slower, because live sets are small and a mask grows with the number of values. It is still a small part of the total. On ordinary code, compiling
Testing
This is independent of #22425 (which removes temporaries from the must-defined universe). The two merge without conflicts and help in different ways: #22425 makes the sets smaller, this PR makes each item cost a bit instead of a hash table entry.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsrun_analysis stored a Python set for every basic block and for every op whose gen/kill sets were non-empty. For large functions these sets have thousands of items, so the analyses used O(ops * values) memory and time. The must-defined and borrowed-arguments analyses were the worst, since they start from the full universe in every block. Represent the sets as int bit masks instead. The results are BitSet objects, which implement collections.abc.Set, so the users of the analyses only needed annotation changes. The refcount transform shares a BitIndex between its three analyses, so the set operations it does between their results are integer operations. The generated IR and C are unchanged.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |