Created
October 6, 2025 23:36
-
-
Save zeusdeux/f1143bf13acdc02e2ed9bdcf6436da5b to your computer and use it in GitHub Desktop.
Using node intrinsics to force optimizations
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
// node --allow-natives-syntax --print-opt-code --trace-deopt force-opt.js | |
function test(x) { return 1 + Math.sin(x) } | |
%PrepareFunctionForOptimization(test); | |
test(0.5); test(0.6); | |
%OptimizeFunctionOnNextCall(test); | |
test(0.7); | |
%FinalizeOptimization(); | |
%GetOptimizationStatus(test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment