join vs plus
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var string0 = "I AM A STRING";
var string1 = "I AM ALSO A STRING";
var string2 = "I AM NO DIFFERENT THAN THE OTHERS";
var string3 = "I AM STARTING TO RUN OUT OF CLEVER THINGS TO SAY";
var string4 = "5 OF THESE SHOULD BE GOOD";
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
join 2 |
|
pending… |
plus 2 |
|
pending… |
join 5 |
|
pending… |
plus 5 |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments