Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
Firefox 106
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
Boolean 795005312.0 Ops/sec
Boolejan 783902144.0 Ops/sec
Boolejan 2 449934560.0 Ops/sec
Script Preparation code:
x
 
var bFalse = false;
var sEmpty = '';
var sFilled = 'Foo';
var nZero = 0;
var nOne = 1;
var Boolejan = (input) => !!input
var Boolejan2 = (input) => !input ? false : true
Tests:
  • Boolean

     
    Boolean(bFalse)
    Boolean(sEmpty)
    Boolean(sFilled)
    Boolean(nZero)
    Boolean(nOne)
  • Boolejan

     
    Boolejan(bFalse)
    Boolejan(sEmpty)
    Boolejan(sFilled)
    Boolejan(nZero)
    Boolejan(nOne)
  • Boolejan 2

     
    Boolejan2(bFalse)
    Boolejan2(sEmpty)
    Boolejan2(sFilled)
    Boolejan2(nZero)
    Boolejan2(nOne)