Accessing DOM Elements (v3)

Revision 3 of this benchmark created on


Preparation HTML

<div id="message"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
getElementById
document.getElementById('message');
ready
querySelector
document.querySelector('#message');
ready
getElementsByTagName
document.getElementsByTagName('div')[0];
ready
querySelectorAll
document.querySelectorAll('#message')[0];
ready

Revisions

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