Created
November 30, 2011 17:52
-
-
Save jpedrosa/1410010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ frogsh append.dart | |
Elapsed time: 0.04 | |
1500237.4288328215 | |
$ cat append.dart | |
main() { | |
var nn = []; | |
for (var i = 0; i < 3000000; i++) { | |
nn.add(Math.random()); | |
} | |
var sum = 0; | |
var sw = new Stopwatch(); | |
sw.start(); | |
for (var n in nn) { | |
sum += n; | |
} | |
sw.stop(); | |
print("Elapsed time: ${sw.elapsedInMs() / 1000}"); | |
print(sum); | |
} | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment