dataset vs javascript attribute

Benchmark created on


Preparation HTML

<div id="holder"></div>

Setup

var img, holder = document.getElementById('holder');

Test runner

Ready to run.

Testing in
TestOps/sec
dataset
img = new window.Image();
img.dataset.trial = 0;
img.dataset.essay = 'string';
img.dataset.attempt = 12 / 6;
ready
attribute
img = new window.Image();
img.trial = 0;
img.essay = 'string';
img.attempt = 12 / 6;
ready

Revisions

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