Last active
August 10, 2017 22:21
-
-
Save bengl/4a3951b68b7be4151aac4a3d1fb58005 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
// Try running this file in Node 8.2.1 | |
// Try running this file in Node 8.3.0 | |
// Try running this file in d8 for Node 8.3.0 | |
function empty() {} | |
let i, j, d; | |
for(j = 0; j < 5; j++) { | |
d = Date.now(); | |
for (i = 0; i < 1e7; i++) { | |
empty(); | |
} | |
console.log(j, 0, Date.now() - d); | |
d = Date.now(); | |
for (i = 0; i < 1e7; i++) { | |
empty(); | |
} | |
console.log(j, 1, Date.now() - d); | |
d = Date.now(); | |
for (i = 0; i < 1e7; i++) { | |
empty(); | |
} | |
console.log(j, 2, Date.now() - d); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment