Skip to content

Compute overloaded return type once per type - #2992

Draft
toinehartman wants to merge 26 commits into
mainfrom
feature/tc-performance-overloads
Draft

toinehartman wants to merge 26 commits into
mainfrom
feature/tc-performance-overloads

Conversation

@toinehartman

@toinehartman toinehartman commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Instead of doing the (expensive) return type computation once per overload, do it once per type, and use the results for all overloads with equal types.

This reduces the time needed to type-check highly overloaded and highly recursive modules significantly:

  • lang::rascal::format::Rascal: ~160s => ~60s
  • Rascal compiler: ~1:20h => ~1:00h

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46%. Comparing base (c5d7d68) to head (363d153).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2992   +/-   ##
=======================================
- Coverage       46%     46%   -1%     
- Complexity    6897    6899    +2     
=======================================
  Files          851     851           
  Lines        69233   69233           
  Branches     10084   10084           
=======================================
- Hits         32064   32054   -10     
- Misses       34741   34749    +8     
- Partials      2428    2430    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch from 01b7be4 to 0ae860a Compare November 12, 2026 16:03
@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch from 0ae860a to 6ecca6c Compare November 12, 2026 16:27
@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch from e219026 to a665acf Compare November 16, 2026 12:38
@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch 3 times, most recently from c87e330 to b2cb353 Compare November 17, 2026 09:30
@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch from 0e941bd to 70f831b Compare November 17, 2026 09:34
@toinehartman
toinehartman force-pushed the feature/tc-performance-overloads branch from 014cad6 to 2b66523 Compare November 17, 2026 10:06
@toinehartman toinehartman changed the title Type-checker performance on overloads Compute overloaded return type once per type Nov 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant