Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Chrome 110
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Unary 1040832896.0 Ops/sec
parseInt 14718068.0 Ops/sec
Number conversion 15912030.0 Ops/sec
double bitwise not 1043304320.0 Ops/sec
bitwise or 1041428928.0 Ops/sec
Tests:
  • Unary

    AخA
     
    const num = +"10"
  • parseInt

     
    const num = parseInt("10")
  • Number conversion

     
    const num = Number("10")
  • double bitwise not

     
    ~~("10")
  • bitwise or

     
    ("10") | 0