Is there a performance difference between requestAnimationFrame() and setAnimationLoop()?

We know we have two options for creating a render loop:

a):

animate();
function animate() {
		requestAnimationFrame( animate );
		render();
}

function render(){
. . . . 
}

b):

renderer.setAnimationLoop( render );

function render(){
. . . . 
}

The first one is only compatible to standard, non-VR projects.
The second one, is compatible to both VR and non-VR projects.

Since I first used renderer.setAnimationLoop() in WebXR, I’m always using it in all projects, as it seems to me more straightforward, and because it’s a single approach for everything, but I wonder, is there a slight performance difference known between the two (I haven’t noticed any)?
In some cases, maybe?

If not, why not ditch the other version …and adopt the single, all-compatible approach?

1 Like

being able to call render yourself makes it possible to render single snapshots, postprocessing, and you get to define how the loop works, for instance for on demand rendering in order to save battery. if your renderloop runs always i think you can use setanimloop just fine.

1 Like

Good points! Albeit I’m always on the “run”! :slight_smile:

EDIT:
What I’m looking for is whether there is information about actual performance difference in normal conditions, which is the 99% of all cases, in order to decide whether or not I’ll keep using it, so until then, I don’t consider this question answered or “solved”. Of course, helpful hints are welcome and appreciated.