Bolean vs !!

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Using Boolean
for (let i = 0; i < 10000000; i++) {
    Boolean(i);
}
ready
using !!
for (let i = 0; i < 10000000; i++) {
    !!i;
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.