summaryrefslogtreecommitdiffstats
path: root/testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html
blob: 2a6849da309cfbe48e0ec2d792c342cc22a355d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<script src="util.js"></script>
<script>
onload = function() {
  var count = 20000000;
  var el = document.createElement("span");
  // The longest string we can fit in an autostring buffer (63 chars).
  el.id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  var getter = Object.getOwnPropertyDescriptor(Element.prototype, "id").get;
  perf_start();
  for (var i = 0; i < count; ++i) {
    getter.call(el);
  }
  perf_finish();
};
</script>