1
0
forked from Mirror/wren

Add some Dart benchmarks running on fletch.

This commit is contained in:
Bob Nystrom
2015-12-05 11:09:30 -08:00
parent 0f9e2a49ce
commit 10ece995f7
7 changed files with 917 additions and 0 deletions

13
test/benchmark/fib.dart Normal file
View File

@ -0,0 +1,13 @@
fib(n) {
if (n < 2) return n;
return fib(n - 1) + fib(n - 2);
}
main() {
Stopwatch watch = new Stopwatch();
watch.start();
for (var i = 0; i < 5; i++) {
print(fib(28));
}
print("elapsed: ${watch.elapsedMilliseconds / 1000}");
}