split
JavaScript performance comparison
Info
Split a string to retrieve number at beginning
Preparation code
<script>
Benchmark.prototype.setup = function() {
str = "1000: rest of string";
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
split |
|
pending… |
regex1 |
|
pending… |
substring |
|
pending… |
substring_search |
|
pending… |
regex2 |
|
pending… |
regex_3 |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments