When it comes to performance and performance alone, which option is superior?
1)
function GameLoop()
{
// Performing complex calculations
requestAnimationFrame(GameLoop);
}
requestAnimationFrame(GameLoop);
2)
function GameLoop()
{
// Performing complex calculations
requestAnimationFrame(function()
{
GameLoop();
});
}
requestAnimationFrame(GameLoop);