Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: PerformanceTests/Bindings/get-attribute-rare.html

Issue 189483004: WontFix: Add fast path for id/name/style/class in getAttribute/setAttribute bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add performance tests about rare attribute. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | PerformanceTests/Bindings/set-attribute-rare.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <div id="foo"></div> 4 <div id="foo" role="group"></div>
5 <script src="../resources/runner.js"></script> 5 <script src="../resources/runner.js"></script>
6 <script> 6 <script>
7 var div = document.getElementById("foo"); 7 var div = document.getElementById("foo");
8 8
9 PerfTestRunner.measureRunsPerSecond({ 9 PerfTestRunner.measureRunsPerSecond({
10 description: "This benchmark covers 'getAttribute' in Dromaeo/dom-attr.html, and other DOM methods that return a String.", 10 description: "This benchmark covers 'getAttribute' in Dromaeo/dom-attr.html, and other DOM methods that return a String.",
11 run: function() { 11 run: function() {
12 var localDiv = div; 12 var localDiv = div;
13 for (var i = 0; i < 100000; i++) 13 for (var i = 0; i < 100000; i++)
14 localDiv.getAttribute("id"); 14 localDiv.getAttribute("role");
15 }}); 15 }});
16 </script> 16 </script>
17 </body> 17 </body>
18 </html> 18 </html>
OLDNEW
« no previous file with comments | « no previous file | PerformanceTests/Bindings/set-attribute-rare.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698