localStorage writing (v29)

Revision 29 of this benchmark created on


Description

Tests the different writings to localStorage.

Preparation HTML

<script>
  localStorage.clear();
</script>

Setup

localStorage.clear();

Test runner

Ready to run.

Testing in
TestOps/sec
Writing to localStorage via property
localStorage.foo = "body { background: blue; margin: 10px; padding: 10px; color: black; text-decoration: none; }";

 
ready
Writing to localStorage index
localStorage['foo'] = "body { background: blue; margin: 10px; padding: 10px; color: black; text-decoration: none; }";
ready
Writing to localStorage with setItem
localStorage.setItem("foo", "body { background: blue; margin: 10px; padding: 10px; color: black; text-decoration: none; }");
ready

Revisions

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