-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: more complex partial evaluation #15802
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
|
|
One thing I realized we should optimize is |
Am considering either adding a ton of tests to |
Thank you but I really don't think this is a good direction to go in. It adds a lot of complexity for a benefit that is mostly academic, and which mostly belongs at the level of a general purpose optimiser. It can also be counterproductive (think Am actually rethinking #15494 and #15781 and plan to partly revert them. We shouldn't be inlining these values, but we should be using our domain-specific knowledge to emit code that can be more easily optimized. For example in a case like ![]() ![]() |
I see what you mean, but is there really much reason to revert the other PRs? They're much simpler and (according to the ~6000 tests) are error-free. |
Like #15781, this PR will add more partial evaluation to the compiler. Some of the goals here are:
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint