Javascript why is "true === true" slower then "true === !0"

Viewed 61

I found out that babel is compiling true and false to !0 and !1 in some situations. I made some benchmarks online and found out that it seems to be faster to compare "true === !0" then compare "true === true". Why is this the case ?

Example code which was transpiled by babbel

 Object.defineProperty(e, t, {
        configurable: !1,
        enumerable: !0,
        get: o
    })

enter image description here

0 Answers
Related