-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(es/typescript): Handle unicode for fast ts strip #9202
Conversation
// This is bit magic equivalent to: b < 128 || b >= 192 | ||
(*self as i8) >= -0x40 |
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.
Is this copied from some legacy code, or eyeball optimized? The expression in comment compiles to exact same code with the "optimized" one: https://godbolt.org/z/KsqjM8jad
IMO, readability is more important if they are actually the same.
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.
Copy from std::core::num::u8
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.
swc-bump:
- swc_fast_ts_strip
CodSpeed Performance ReportMerging #9202 will improve performances by 5.84%Comparing Summary
Benchmarks breakdown
|
Description:
BREAKING CHANGE:
Related issue (if exists):