-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Only collect outermost intra expression inference sites #54186
Only collect outermost intra expression inference sites #54186
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
1 similar comment
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
The perf machine is currently offline but I'll run that once it's back again and caught up. If you can show a diff before/after in your xstate case that'd be helpful! @typescript-bot test this |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 2aa9fe4. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 2aa9fe4. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the tarball bundle task on this PR at 2aa9fe4. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 2aa9fe4. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the extended test suite on this PR at 2aa9fe4. You can monitor the build here. |
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Hey @jakebailey, the results of running the DT tests are ready. |
@typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at a8a2ff5. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:Comparison Report - main..54186
System
Hosts
Scenarios
Developer Information: |
@typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at a8a2ff5. You can monitor the build here. Update: The results are in! |
@jakebailey Here they are:Comparison Report - main..54186
System
Hosts
Scenarios
Developer Information: |
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.
IMO, it'd be nice if we had a pathlogical test that this fixes in our test suite, eg, a constructed examples this takes from 50s (timing out) down to 5s (since, unless I'm mistaken, this is the category of change that, in constructed examples, takes something from exponential time to linear time). While this is good, since it doesn't show much change in the perf suites, without anything benching the improvement, this might get lost in a future update without such a test.
I see that for some reason |
Probably just that the branch was out of date when it was merged. |
Ye, right - I narrowed it down to a silent conflict with: #54380 , looking now if I can make it work in a reasonable time. |
…osoft#54186)" This reverts commit 4749c38.
It's a potential perf improvement. However, I don't expect this to yield significant gains in the automated tests - this can probably only show in more pathological cases with big objects used as arguments. It happens that in XState we deal with such so maybe I would be able to gather some more concrete data based on that.
At the moment, in a case like this:
we collect four intra expression inference sites. The innermost function (site 1) "taints" all the objects containing it (minus the root one). This is because
isContextSensitive
is recursive.This means that
isContextSensitive
has to be computed at all of those levels and that we end up inferring from all of those levels separately withininferFromIntraExpressionSites
. Most of that work is more than duplicated here since the outermost expression contains all of the information that can be found in the expressions contained in it.