Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
perf: deduplicatefast_container_type andfast_dict_type items before joining#19409
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
2f2c39148cb9e119f02607d9dcb60cc75eb48bc430ff26ebfb608a6646f78253aa94728882c800f560b3c2fd9faaf92439File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -5092,21 +5092,22 @@ def fast_container_type( | ||||||||||||||||
| if typ not in values: | ||||||||||||||||
sterliakov marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||||||||||||||||
| values.append(typ) | ||||||||||||||||
| vt = self._first_or_join_fast_item(values) | ||||||||||||||||
| if vt is None: | ||||||||||||||||
| self.resolved_type[e] = NoneType() | ||||||||||||||||
| return None | ||||||||||||||||
| ct = self.chk.named_generic_type(container_fullname, [vt]) | ||||||||||||||||
| self.resolved_type[e] = ct | ||||||||||||||||
| return ct | ||||||||||||||||
| def _first_or_join_fast_item(self, items: list[Type]) -> Type | None: | ||||||||||||||||
| if len(items) == 1 and not self.chk.current_node_deferred: | ||||||||||||||||
| return items[0] | ||||||||||||||||
| typ = join.join_type_list(items) | ||||||||||||||||
| if not allow_fast_container_literal(typ): | ||||||||||||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This feels a bit restrictive together with the above CollaboratorAuthor
| ||||||||||||||||
| defcombine_similar_callables(t:CallableType,s:CallableType)->CallableType: | |
| t,s=match_generic_callables(t,s) | |
| arg_types:list[Type]= [] | |
| foriinrange(len(t.arg_types)): | |
| arg_types.append(safe_join(t.arg_types[i],s.arg_types[i])) | |
| # TODO kinds and argument names |
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.
OK, I see, makes sense.