String To Number conversion
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var string = "1234567890";
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Unary Plus |
|
pending… |
ParseInt |
|
pending… |
ParseFloat |
|
pending… |
Times One |
|
pending… |
Number cast |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
1 comment
Please check my test: http://jsperf.com/replacechild-removechild/2