Created
June 20, 2017 20:38
-
-
Save ngryman/fd9bcd96910409f91af00d9fd4178a10 to your computer and use it in GitHub Desktop.
Prevent type feedback leakage.
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
// Need to generate core of the benchmark dynamically to ensure | |
// that type feedback does not leak between individual sample runs. | |
var code = " /* " + (UID++) + " */ " + " for (var i = 0; i < N; i++) {" + | |
" var obj = arr[i];" + | |
" result += obj.x + obj.y + i;" + | |
"}" + | |
"return result"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment