Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example JavaScript that dumps different bytecode with Nashorn 8u60b18 and 9b67
var sum = 0;
for (var i = 0; i < 1000000; i++)
{
sum = addOne(sum);
sum = addTwo(sum);
}
print(sum);
function addOne(number)
{
return add(number, 1);
}
function addTwo(number)
{
return add(number, 2);
}
function add(x, y)
{
return x + y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.