Last active
March 1, 2021 00:12
-
-
Save micimize/8abca4b0c0810e91f94f0faf04b15355 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
import 'dart:math'; | |
void main() { | |
final bigNumber = 100000000; | |
final w = new Stopwatch()..start(); | |
for (int i = 0; i < bigNumber; i++) { | |
try { | |
sin(1); | |
} catch (ex) { | |
print(ex.toString()); | |
} | |
} | |
w.stop(); | |
print(w.elapsed); | |
w..reset()..start(); | |
for (int i = 0; i < bigNumber; i++) { | |
sin(1); | |
} | |
w.stop(); | |
print(w.elapsed); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment