Created
September 21, 2018 13:38
-
-
Save Constellation/03091c4e6310b2afd481cea621240b66 to your computer and use it in GitHub Desktop.
test.js
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
function test(string) { return string.length; } | |
noInline(test); | |
function check(value, expected) { if (value !== expected) throw new Error("out"); } | |
noInline(check); | |
for (var i = 0; i < 1e6; ++i) | |
check(test("Hello"), 5); | |
var obj = { length: 42 }; | |
for (var i = 0; i < 1e6; ++i) { | |
check(test("Hello"), 5); | |
check(test(obj), 42); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment