I was looking at https://github.com/facebook/react/issues/12700, and this seemed suspicious.

Consider this case:

```js
class App extends React.Component {
  componentDidMount() {
    for (let i = 0; i < 10000; i++) {
      ReactDOM.render(<div />, document.createElement('div'));
    }   
  }
  render() {
    return null
  }
}

ReactDOM.render(<App />, document.getElementById('root'));
```

Profiling tells me we spend a *lot* of time searching for a root:

<img width="838" alt="screen shot 2018-08-07 at 12 12 52 am" src="https://user-images.githubusercontent.com/810438/43745499-f8716922-99d6-11e8-8822-380dcb15bfa3.png">

Adding some logging shows that e.g. for a 1000 roots, we'll run [this loop iteration](https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberScheduler.js#L1798-L1846) 1000 times for the first root, then 999 times for the second root, then 998 times for the third root, etc. Oops.

This is surely a bug?
stopCommitLifeCyclesTimer,
} from './ReactDebugFiberPerf';
import {createWorkInProgress, assignFiberPropertiesInDEV} from './ReactFiber';
import {onCommitRoot} from './ReactFiberDevToolsHook';
import {
  NoWork,
  Sync,
  Never,
  msToExpirationTime,
  expirationTimeToMs,
  computeAsyncExpiration,
  computeInteractiveExpiration,
} from './ReactFiberExpirationTime';
import {AsyncMode, ProfileMode} from './ReactTypeOfMode';
import {enqueueUpdate, resetCurrentlyProcessingQueue} from './ReactUpdateQueue';
import {createCapturedValue} from './ReactCapturedValue';
import {
  popTopLevelContextObject as popTopLevelLegacyContextObject,
  popContextProvider as popLegacyContextProvider,
} from './ReactFiberContext';
import {popProvider, resetContextDependences} from './ReactFiberNewContext';
import {popHostContext, popHostContainer} from './ReactFiberHostContext';
import {
  checkActualRenderTimeStackEmpty,
  pauseActualRenderTimerIfRunning,
  recordCommitTime,
  recordElapsedActualRenderTime,
  recordElapsedBaseRenderTimeIfRunning,
  resetActualRenderTimerStackAfterFatalErrorInDev,
  resumeActualRenderTimerIfPaused,