-
Notifications
You must be signed in to change notification settings - Fork 464
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
Example of complex pattern for untagged variant. #6240
Conversation
@zth see examples of simplifications in the various commits. Some things to think about:
Basically, the question is of return on investment. What do you think? |
var match$1 = s[1]; | ||
if ((match$1 === null || typeof match$1 !== "object") && match$1 === false) { | ||
if (match$1 === false) { |
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.
Nice!
These are good questions. I'd say it looks quite a lot simpler. But, I don't have good answers for the rest of the questions... Is this type of optimization very specific to just these cases? |
Pros:
Cons:
|
How about exploring more cases next? Can you give me another example that falls outside what this PR does? E.g. not only booleans. |
Coming back to this soon. |
Haven't been able to figure out a good other example. This does feel like a nice improvement as is. What about merging this and then continuing with more examples later on? |
b904343
to
ad80be2
Compare
From #6108