CLJS-ArrayVector

JavaScript performance comparison

Revision 2 of this test case created by Jozef Wagner

Info

Benchmarking ClojureScript ArrayVector, see https://github.com/wagjo/benchmark-cljs

Preparation code

<script src="//wagjo.github.io/benchmark-cljs/benchmark.js"></script>
<script>window.addEventListener("load", function() {benchmarkWrap();}, false);</script>
 
<script>
Benchmark.prototype.setup = function() {
    var arr = small_vectorCreateArray();
    var avec = small_vectorCreateArrayVector();
    var pvec = small_vectorCreatePersistentVector();
};
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
create array
small_vectorCreateArray();
pending…
create ArrayVector
small_vectorCreateArrayVector();
pending…
create PersistentVector
small_vectorCreatePersistentVector();
pending…
access array
small_vectorAccessArray(arr);
pending…
access ArrayVector
small_vectorAccessArrayVector(avec);
pending…
access PersistentVector
small_vectorAccessPersistentVector(pvec);
pending…
access ArrayVector with destructuring
small_vectorDestructureArrayVector(avec);
pending…
access PersistentVector with destructuring
small_vectorDestructurePersistentVector(pvec);
pending…
conjoin to array
small_vectorConjArray(arr);
pending…
conjoin to ArrayVector
small_vectorConjArrayVector(avec);
pending…
conjoin to PersistentVector
small_vectorConjPersistentVector(pvec);
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