Created
August 26, 2012 11:17
-
-
Save erdbeerschnitzel/3477668 to your computer and use it in GitHub Desktop.
Dart GCF Performance Test
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
void main() { | |
for(int a = 0; a < 10; a++){ | |
Date d = new Date.now(); | |
for(int i = 0; i < 100000; i++){ | |
ggt(31232004,i); | |
} | |
print("${new Date.now().difference(d)}:"); | |
} | |
} | |
int ggt(int zahl1, int zahl2) { | |
while (zahl2 != 0) { | |
if (zahl1 > zahl2) { | |
zahl1 = zahl1 - zahl2; | |
} else { | |
zahl2 = zahl2 - zahl1; | |
} | |
} | |
return zahl1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment