local storage vs. local variable

Benchmark created on


Setup

localStorage.setItem("test", "hello");
    var x = "hello";

Test runner

Ready to run.

Testing in
TestOps/sec
localStorage.getItem()
if (localStorage.getItem("test")) {}
ready
local variable
if (x) {}
ready

Revisions

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