- HA
There is no need to explicitly cast the expression inside `if` statement to boolean, so we can remove `!!`.
Please let me know if it was done by intention @lukeed
Locally benchmarks show weird results even if I don't change anything
lukeedmentioned7 years ago on GitHub
lukeedsubscribed7 years ago on GitHub
- LU
Hey, thank you
It was intentional. It's a deoptimization to have V8 infer/cast to boolean types for you. It may not greatly affect the benchmark numbers significantly (though usually it does), but at runtime/in the wild, it will leave the user code running in a deoptimized state
- HA
Good to know, thanks @lukeed
lukeedmentioned7 years ago on GitHub
lukeedsubscribed7 years ago on GitHub