Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 3d59a92

Browse files
vicbmhevery
authored andcommitted
chore(call perf): fix unfair tests
The wrapped called was doing an addition instead of only return a Closes #733
1 parent 56647a3 commit 3d59a92

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

perf/invoke_perf.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ main() {
1111
var streamC = new StreamController(sync:true);
1212
var stream = streamC.stream..listen(handleIndirect);
1313

14-
time('direct', () => handleDirect(1, 2, 3) );
15-
time('.call', () => wrap(1, 2, 3) );
16-
time('directNamed', () => handleDirectNamed(a:1, b:2, c:3) );
17-
time('indirect', () => handleIndirect(new Container(1, 2, 3)) );
14+
time('direct', () => handleDirect(1, 2, 3));
15+
time('.call', () => wrap(1, 2, 3));
16+
time('directNamed', () => handleDirectNamed(a:1, b:2, c:3));
17+
time('indirect', () => handleIndirect(new Container(1, 2, 3)));
1818
time('stream', () => streamC.add(new Container(1, 2, 3)));
1919
}
2020

2121
class Container {
22-
var a;
23-
var b;
24-
var c;
22+
final a;
23+
final b;
24+
final c;
2525

2626
Container(this.a, this.b, this.c);
2727
}
2828

29-
class Wrap {
30-
call(a, b, c) => a + b + c;
29+
class Wrap implements Function {
30+
call(a, b, c) => a;
3131
}

0 commit comments

Comments
 (0)