reverse-word-letters

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var words = new Array(5000).join('someword ');
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
with map
var r = words.split(' ').map(function(item) {
  return item.split('').reverse().join('');
}).join(' ');
pending…
without map
var r = words.split("").reverse().join("").split(" ").reverse().join(" ");
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment