blob: 5b9430134aade7174fc82a4eb255a7905c91c167 (
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");
// A very short string.
el.id = "a";
var getter = Object.getOwnPropertyDescriptor(Element.prototype, "id").get;
perf_start();
for (var i = 0; i < count; ++i) {
getter.call(el);
}
perf_finish();
};
</script>
|