toString() vs ""+ Cast

Benchmark created on


Setup

var i = 100;

Test runner

Ready to run.

Testing in
TestOps/sec
toString()
var b = i.toString();
ready
"" +
var b = "" + i;
ready

Revisions

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