summaryrefslogtreecommitdiffstats
path: root/testing/talos/talos/tests/perf-reftest-singletons/id-getter-5.html
blob: 4677c38e3a22cc76c217e5567981b38f898a564d (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 shortest string we can't fit in an autostring buffer (64 chars).
  el.id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  var getter = Object.getOwnPropertyDescriptor(Element.prototype, "id").get;
  perf_start();
  for (var i = 0; i < count; ++i) {
    getter.call(el);
  }
  perf_finish();
};
</script>