Skip to content

Instantly share code, notes, and snippets.

@jehna
Created October 27, 2021 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jehna/bc92c46f2b05b9ea59aedb66c6afe023 to your computer and use it in GitHub Desktop.
Save jehna/bc92c46f2b05b9ea59aedb66c6afe023 to your computer and use it in GitHub Desktop.
Print TurboFan optimized machine code of a function
// Run with node --print-opt-code --allow-natives-syntax --print-code index.js
function plus(a, b) {
return a + b
}
plus(1, 2);
%OptimizeFunctionOnNextCall(plus);
plus(2, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment