amplify.store vs storage.js

Benchmark created on


Description

Checking the speed of Store.JS vs Amplify.Store

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js">
</script>
<script src="https://raw.github.com/appendto/amplify/master/store/amplify.store.js">
</script>
<script src="https://raw.github.com/marcuswestin/store.js/master/store.js">
</script>

Teardown


    store.clear();
    amplify.store("a1", null);
    amplify.store("a2", null);
    amplify.store("a3", null);
  

Test runner

Ready to run.

Testing in
TestOps/sec
Store.JS
$(function() {
  store.set("s1", 1);
  store.set("s2", 2);
  store.set("s3", 3);
  var svar1 = store.get("s1");
  var svar2 = store.get("s2");
  var svar3 = store.get("s3");
});
ready
Amplify.Store
$(function() {
  amplify.store("a1", 1);
  amplify.store("a2", 2);
  amplify.store("a3", 3);
  var avar1 = amplify.store("a1");
  var avar2 = amplify.store("a2");
  var avar3 = amplify.store("a3");
});
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.