Number vs. plus vs. toInt vs. toFloat

Benchmark created by Nyuszika7H on


Preparation HTML

<script>
  var num = '123';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Number
Number(num);
ready
+
+num;
ready
toInt
num.toInt();
ready
toFloat
num.toFloat();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.