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

Commit

Permalink
chore(call perf): fix unfair tests
Browse files Browse the repository at this point in the history
The wrapped called was doing an addition instead of only return a

Closes #733
  • Loading branch information
vicb authored and mhevery committed Mar 15, 2014
1 parent 56647a3 commit 3d59a92
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions perf/invoke_perf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ main() {
var streamC = new StreamController(sync:true);
var stream = streamC.stream..listen(handleIndirect);

time('direct', () => handleDirect(1, 2, 3) );
time('.call', () => wrap(1, 2, 3) );
time('directNamed', () => handleDirectNamed(a:1, b:2, c:3) );
time('indirect', () => handleIndirect(new Container(1, 2, 3)) );
time('direct', () => handleDirect(1, 2, 3));
time('.call', () => wrap(1, 2, 3));
time('directNamed', () => handleDirectNamed(a:1, b:2, c:3));
time('indirect', () => handleIndirect(new Container(1, 2, 3)));
time('stream', () => streamC.add(new Container(1, 2, 3)));
}

class Container {
var a;
var b;
var c;
final a;
final b;
final c;

Container(this.a, this.b, this.c);
}

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

0 comments on commit 3d59a92

Please sign in to comment.