Last active
November 15, 2019 13:08
-
-
Save giltayar/e36b624d10cbfad361210d1e7ca58d8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let i = 0 | |
const start = Date.now() | |
setInterval(() => console.log(++i, Date.now() - start), 1000) | |
console.time('bigcalc') | |
for (let i = 0; i < 10000000000; ++i) { | |
Math.cos(37863443 * Math.exp(23749374)) | |
} | |
console.timeEnd('bigcalc') | |
/** Result: | |
bigcalc: 11814.690ms | |
1 11818 | |
2 12820 | |
3 13821 | |
4 14822 | |
5 15824 | |
6 16828 | |
7 17831 | |
8 18833 | |
9 19833 | |
10 20835 | |
11 21838 | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment