blob: 47d7f8f1e47278eb409cc19a38b3f91c905c7767 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<img id="foo" name="bar">
<script src="../resources/runner.js"></script>
<script>
var imageElement = document.querySelector("img");
imageElement.id = "foo";
PerfTestRunner.measureRunsPerSecond({
description: "This benchmark covers 'getElementById' in Dromaeo/dom-query.html, and other DOM methods that return a Node object.",
run: function() {
for (var i = 0; i < 100000; i++)
imageElement.id = i % 2 ? "foo1" : "foo0";
}});
</script>
</body>
</html>