Compositing with render layers that are unchecked
It could be more efficient not to animate the renderability of the Render Layer rather than to animate amount of samples for that Render Layer instead. 

Find and animate Samples option which will override scene setting for samples. 



This amount of samples can be set up for each Render Layer separately. So when that layer should be empty, drop the samples amount to some small value (but not to 0 as it will mean default which is the scene values) and the perfomance will be increased. 

The layers still will be overlayed; you can bypass data from one of them animating the Factor of the Alpha Over (or Mix) node (e.g. setting it to 1 to make only bottom layer visible).