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

Some continued performance improvements #832

Merged
merged 10 commits into from
Jan 10, 2024
Merged

Some continued performance improvements #832

merged 10 commits into from
Jan 10, 2024

Conversation

scotttrinh
Copy link
Collaborator

A handful of smaller improvements. Some of these are micro-optimizations, but a few had some measurable impact. I don't think there is much low-hanging fruit that I can use these same tricks on as far as I can tell, but here are the general flavors of these changes:

  • Preferring Omit + intersection to "replace" a particular property on a type instead of mapping each property directly.
  • Name unions used in conditional types
  • Name internal conditional types within a larger conditional type

None of these seem to be silver bullets, and required actually benchmarking the changes to detect if they made things worse or better. Still not sure if I have a good intuition yet.

- Delta: 0.00%
- Delta: 0.00%
- Delta: -3.54%
- Delta: -2.27%
- Delta: -16.53%
- Delta: -0.02%
- Delta: -1.39%
- Delta: -1.33%
- Delta: -1.39%
- Delta: -1.38%
- Delta: -15.40%
- Delta: -7.44%
- Delta: -4.43%
- Delta: -3.57%
- Delta: -2.77%
- Delta: -16.90%
- Delta: -1.48%
- Delta: -2.57%
- Delta: -2.46%
- Delta: -2.56%
- Delta: -2.55%
- Delta: -15.40%
- Delta: -7.44%
- Delta: -4.43%
- Delta: -5.01%
- Delta: -5.81%
- Delta: -19.64%
- Delta: -3.00%
- Delta: -5.08%
- Delta: -4.37%
- Delta: -4.54%
- Delta: -4.52%
- Delta: -15.40%
- Delta: -8.55%
- Delta: -5.09%
- Delta: -5.01%
- Delta: -5.81%
- Delta: -19.64%
- Delta: -3.00%
- Delta: -5.08%
- Delta: -4.37%
- Delta: -4.54%
- Delta: -4.52%
@scotttrinh scotttrinh merged commit bf19955 into master Jan 10, 2024
8 checks passed
@scotttrinh scotttrinh deleted the select-perf branch January 10, 2024 18:14
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.

1 participant