-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
fix: typechecker hotspot #3318
fix: typechecker hotspot #3318
Conversation
get_possible_types_from_node had blowup for deeply nested expressions. this caches intermediate results using dynamic programming to prune the calculation time.
I quickly checked, and can confirm my example compiles under a second with the following init code: 0x6102fd610011610000396102fd610000f360003560e01c346102eb576381d18d8781186102e457602436106102eb576004356040527ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c16004351361005a576000606052602060606102e2565b680755bf798b4a1bf1e460043513156100ca5760166060527f4d6174683a207761645f657870206f766572666c6f770000000000000000000060805260605060605180608001601f826000031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b6503782dace9d960043580604e1b9050056040526b8000000000000000000000006bb17217f7d1cf79abc9e3b3986040518060601b905005018060601d90506060526bb17217f7d1cf79abc9e3b39860605102604051036040526d02d16720577bd19bf614176fe9ea6040516c10fe68e7fd37d0007b713f765060405101028060601d90500160805279d835ebba824c98fb31b83b2ca45c0000000000000000000000006040516e0587f503bb6ea29d25fcb7401964506080516d04a4fd9f2a8b96949216d2255a6c6040516080510103028060601d905001020160a0526e05180bb14799ab47a8a8cb2a527d576040516e02c72388d9f74f51a9331fed693f156040516db1bbb201f443cf962f1a1d3db4a56040516d1a521255e34f6a5061b25ef1c9c46040516d0277594991cfc85f6e2461837cd96040516c240c330e9fb2d9cbaf0fd5aafc60405103028060601d905001028060601d905003028060601d905001028060601d905003028060601d90500160c05260c05160a0510560e05274029d9dc38563c32e5c2f6dc192ee70ef65f9978af360e0510260605160c3037f800000000000000000000000000000000000000000000000000000000000000081146102eb576000037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8113156102c55781811b6102cc565b81816000031d5b90509050600081126102eb576101005260206101005bf35b5060006000fd5b600080fda165767970657283000302000b |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #3318 +/- ##
==========================================
+ Coverage 88.79% 88.81% +0.01%
==========================================
Files 84 84
Lines 10637 10654 +17
Branches 2221 2223 +2
==========================================
+ Hits 9445 9462 +17
Misses 790 790
Partials 402 402
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
operations in the type checker
What I did
fix #3316
How I did it
How to verify it
check that the example in #3316 compiles in under a second
Commit message
Description for the changelog
Cute Animal Picture