Lawnchair: webkitsqlite vs domStorage (v8)

Revision 8 of this benchmark created on


Description

Comparing the speed of using a local SQLite database versus window.localStorage to store key/value pairs using Lawnchair.

Preparation HTML

<script src="https://raw.github.com/cscott/lawnchair/master/src/Lawnchair.js"></script>
<script src="https://raw.github.com/cscott/lawnchair/master/src/adapters/dom.js"></script>
<script src="https://raw.github.com/cscott/lawnchair/master/src/adapters/webkit-sqlite.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
DOM
var myData;
lawnchair_dom.nuke();
lawnchair_dom.save(someData, function() {
 lawnchair_dom.get('my-uuid', function(r) {
  myData = r;
  lawnchair_dom.remove('my-uuid');
 })
});
ready
SQL
var myData;
lawnchair_sql.nuke();
lawnchair_sql.save(someData, function() {
 lawnchair_sql.get('my-uuid', function(r) {
  myData = r;
  lawnchair_sql.remove('my-uuid');
 })
});
ready

Revisions

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