Skip to content
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

Simplify only new types to improve performance on incremental analysis #1483

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

bugarela
Copy link
Collaborator

@bugarela bugarela commented Aug 19, 2024

Hello :octocat:

This is a simple performance improvement for the REPL (which uses incremental analysis). Instead of iterating over all types each time inference is called, we use set difference and only iterate over new ids.

No behavior should change (other than performance)

@josef-widder has a large spec that is causing the REPL to be quite slow. This improves that, but I have one more meaningful change cooking. See benchmarks to loading + evaluating a single expression in his project:

Before this fix:

________________________________________________________
Executed in   46.50 secs    fish           external
   usr time   50.78 secs  184.00 micros   50.78 secs
   sys time    0.79 secs   45.00 micros    0.79 secs

After this fix:

________________________________________________________
Executed in   36.97 secs    fish           external
   usr time   41.09 secs  175.00 micros   41.09 secs
   sys time    0.66 secs   28.00 micros    0.66 secs
  • [-] Tests added for any new code
  • [-] Documentation added for any new functionality
  • Entries added to the respective CHANGELOG.md for any new functionality
  • [-] Feature table on README.md updated for any listed functionality

@bugarela bugarela enabled auto-merge August 21, 2024 10:44
@bugarela bugarela merged commit 89db9d7 into main Aug 21, 2024
14 checks passed
@bugarela bugarela deleted the gabriela/type-simp-performance-fix branch August 21, 2024 10:48
@bugarela bugarela mentioned this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants