Script Preparation code:
AخA
 
var input = 5.5;
Tests:
  • floor

     
    Math.floor(input);
  • bit or 0

     
    input | 0;
  • bit not

     
    ~~input
  • parseInt

     
    parseInt(input);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    floor
    bit or 0
    bit not
    parseInt

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36
Chrome 91 on Windows 7
View result in a separate tab
Test name Executions per second
floor 2268936.2 Ops/sec
bit or 0 5889351.5 Ops/sec
bit not 5933020.5 Ops/sec
parseInt 2230798.2 Ops/sec