Number vs parseInt vs String * Number vs Double invert

Edit on GitHub

Speed comparison of String to Int methods

Setup

Tests

  • Number

    Number("123")
  • parseInt

    parseInt("123")
  • String * Number

    "123"*1
  • Double invert

    ~~"123"