Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch DOM bindings to using inlined GetObjectSlot
- Loading branch information
Showing
3 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
var elem = document.documentElement.firstChild; | ||
|
||
var start = (new Date()).getTime(); | ||
for (var i = 0; i < 1000000; i++) { | ||
var start = new Date() | ||
var count = 1000000; | ||
for (var i = 0; i < count; i++) { | ||
var a = elem.nodeType; | ||
} | ||
window.alert((new Date()).getTime() - start); | ||
var stop = new Date() | ||
window.alert((stop - start) / count * 1e6); | ||
|
||
/*start = new Date().getTime(); | ||
for (i = 0; i < 10000; i++) | ||
elem.width = i; | ||
window.alert(new Date().getTime() - start);*/ | ||
window.alert(new Date().getTime() - start);*/ |