Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0
Firefox 134
Linux
Desktop
3 months ago
Test name Executions per second
Math.floor 70697768.0 Ops/sec
Bitwise 796922496.0 Ops/sec
Script Preparation code:
AخA
 
this.numA = Math.random() * 100;
Tests:
  • Math.floor

     
    return Math.floor(this.numA);
  • Bitwise

     
    return ~~this.numA;