Skip to content

Instantly share code, notes, and snippets.

@micimize
Last active March 1, 2021 00:12
Show Gist options
  • Save micimize/8abca4b0c0810e91f94f0faf04b15355 to your computer and use it in GitHub Desktop.
Save micimize/8abca4b0c0810e91f94f0faf04b15355 to your computer and use it in GitHub Desktop.
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