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

Reduce type instantiations in e.literal #924

Merged
merged 12 commits into from Apr 3, 2024
Merged

Conversation

scotttrinh
Copy link
Collaborator

TypeScript 5.4 introduced a pretty significant regression in type performance with the e.literal expression. The changes here are meant to be no-op performance improvements.

Significant performance improvements observed in the latest benchmark tests:

  • e.literal: scalar: -77.80%.
  • e.literal: array literal: -45.89%
  • e.literal: named tuple literal: -33.47%
  • e.tuple: named tuple literal: -20.70%
  • e.literal: tuple literal: -42.10%
  • e.literal: array of tuples: -35.18%

Minor performance deltas were observed in other benchmarks, with most under 1% change from the baseline. Notably, e.array: array of tuples showed a -9.96% delta, and params select had a -6.34% delta.

Significant performance improvements observed in the latest benchmark tests:

- `e.literal: scalar`: -77.80%.
- `e.literal: array literal`: -45.89%
- `e.literal: named tuple literal`: -33.47%
- `e.tuple: named tuple literal`: -20.70%
- `e.literal: tuple literal`: -42.10%
- `e.literal: array of tuples`: -35.18%

Minor performance deltas were observed in other benchmarks, with most
under 1% change from the baseline. Notably, `e.array: array of tuples`
showed a -9.96% delta, and `params select` had a -6.34% delta,
indicating significant improvements.
@scotttrinh scotttrinh changed the base branch from ts-54-benchmarks to master April 3, 2024 16:08
@scotttrinh scotttrinh merged commit 80cd914 into master Apr 3, 2024
9 checks passed
@scotttrinh scotttrinh deleted the literal-type-fix branch April 3, 2024 16:10
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.

None yet

1 participant