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

Side by Side Diff: samples/third_party/dromaeo/tests/dom-attr-htmlfast.dart

Issue 9732019: dart:html perf optimization based on runing Dromaeo benchmarks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to code review comments Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #library("dom_attr");
2 #import("dart:html");
3 #import('runner.dart');
4
5 void main() {
6 final int num = 10240;
7
8 // Try to force real results.
9 var ret;
10
11 Element elem = document.query('#test1');
12 Element a = document.query('a');
13
14 new Suite(window, 'dom-attr')
15 .test('getAttribute', () {
16 for (int i = 0; i < num; i++)
17 ret = elem.$dom_getAttribute('id');
18 })
19 .test('element.property', () {
20 for (int i = 0; i < num * 2; i++)
21 ret = elem.id;
22 })
23 .test('setAttribute', () {
24 for (int i = 0; i < num; i++)
25 a.$dom_setAttribute('id', 'foo');
26 })
27 .test('element.property = value', () {
28 for (int i = 0; i < num; i++)
29 a.id = 'foo';
30 })
31 .end();
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698