erins thing query stuff

Benchmark created by ikt on


Test runner

Ready to run.

Testing in
TestOps/sec
querySelector class
document.querySelector(".foo");
ready
split class
if (".foo" [0] == '#') {
  document.getElementById(".foo".split('#')[1]);
} else if (".foo" [0] == '.') {
  document.getElementsByClassName(".foo".split('.')[1]);
} else {
  document.querySelector(".foo");
}
ready
querySelector id
document.querySelector("#foo");
ready
split id
if ("#foo" [0] == '#') {
  document.getElementById("#foo".split('#')[1]);
} else if ("#foo" [0] == '.') {
  document.getElementsByClassName("#foo".split('.')[1]);
} else {
  document.querySelector("#foo");
}
ready

Revisions

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