addyosmani/basket.js — Issue #24: Perf tests
Author: sindresorhus
Created: 2012-03-05 14:16:05+00:00
State: open

We need some perf tests.
It's hard to accurately measure the performance, so we'll need to discuss how to best approach this.

I've compiled a list with some existing localStorage jsPerf tests we can use as inspiration:

- localStorage key size diff
http://jsperf.com/localstorage-read-write-test/3

- localStorage vs direct object access
http://jsperf.com/localstorage-vs-objects/16

- localStorage vs IndexedDB
http://jsperf.com/indexeddb-vs-localstorage/2

- localStorage getItem / setItem vs getter / setter
http://jsperf.com/localstorage-getitem-setitem-vs-getter-setter

I've noticed localStorage in Safari 5 is about 240x faster than in Chrome 17. It seems like they're doing something right. Anyone why that is?

Not surprising, it's exponentially slower to access big data.

Also, it looks like IndexedDB is way slower than localStorage. Though the jsPerf might be biased. We should create our own to confirm.