-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
perf(types): improve Utilities in types.ts
#3836
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3836 +/- ##
=======================================
Coverage 91.31% 91.31%
=======================================
Files 161 161
Lines 10240 10240
Branches 2997 2997
=======================================
Hits 9351 9351
Misses 888 888
Partials 1 1 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
cd91be3
to
85a3ecf
Compare
Bundle size check
Compiler Diagnostics
Reported by octocov |
Hey @EdamAme-x Can you review this? |
types.ts
types.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked performance on Bun and found a 1.5x improvement.
runtime: bun 1.1.34 (x64-win32)
benchmark avg (min … max) p75 / p99 (min … top 1%)
------------------------------------------- -------------------------------
Before 652.81 µs/iter 645.40 µs █
(362.30 µs … 4.36 ms) 2.84 ms █
( 0.00 b … 2.87 gb) 91.02 mb ▇██▃▃▃▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁
After 405.52 µs/iter 398.70 µs █
(285.70 µs … 3.15 ms) 1.49 ms █
( 0.00 b … 524.00 mb) 31.65 mb ██▇▃▄▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁
@EdamAme-x Thanks! Merging. |
This PR improves the performance of type inferences by updating
types.ts
.IntersectNonAnyTypes
.The author should do the following, if applicable
bun run format:fix && bun run lint:fix
to format the code