anchor.diff:    }
   
     static void _handleTimeout(pendingImmediateCallback) {
  -    int currentTime = new DateTime.now().millisecondsSinceEpoch;
  +    // Fast exit if no timers have been scheduled.
  +    if (_heap.isEmpty && (_firstZeroTimer == null)) {
  +      assert(_receivePort == null);
  +      return;
  +    }
  +
       // Collect all pending timers.
       var head = null;
       var tail = null;
  -    // Keep track of the lowest wakeup times for both the list and heap. If
  -    // the respective queue is empty move its time beyond the current time.
  -    var heapTime = _heap.isEmpty ?
  -        (currentTime + 1) : _heap.first._wakeupTime;
  -    var listTime = (_firstZeroTimer == null) ?
  -        (currentTime + 1) : _firstZeroTimer._wakeupTime;
  -
  -    while ((heapTime <= currentTime) || (listTime <= currentTime)) {
  -      var timer;
  -      // Consume the timers in order by removing from heap or list based on
  -      // their wakeup time and update the queue's time.
  -      assert((heapTime != listTime) ||
  -             ((_heap.first != null) && (_firstZeroTimer != null)));
  -      if ((heapTime < listTime) ||
  -          ((heapTime == listTime) &&
  -           (_heap.first._id < _firstZeroTimer._id))) {
  -        timer = _heap.removeFirst();
  -        heapTime = _heap.isEmpty ? (currentTime + 1) : _heap.first._wakeupTime;
  -      } else {
  -        timer = _firstZeroTimer;
  -        assert(timer._milliSeconds == 0);
  -        _firstZeroTimer = timer._indexOrNext;
  -        if (_firstZeroTimer == null) {
  -          _lastZeroTimer = null;
  -          listTime = currentTime + 1;
  +    if (_heap.isEmpty) {
  +      // Only immediate timers are scheduled. Take over the whole list as is.
  +      assert(_firstZeroTimer != null);
  +      assert(_lastZeroTimer != null);
  +      head = _firstZeroTimer;
  +      tail = _lastZeroTimer;
  +      _firstZeroTimer = null;
  +      _lastZeroTimer = null;
  +    } else {
  +      assert(!_heap.isEmpty);
  +      // Keep track of the lowest wakeup times for both the list and heap. If
  +      // the respective queue is empty move its time beyond the current time.
  +      var currentTime = new DateTime.now().millisecondsSinceEpoch;
  +      var heapTime = _heap.first._wakeupTime;
  +      var listTime = (_firstZeroTimer == null) ?
  +          (currentTime + 1) : _firstZeroTimer._wakeupTime;
  +
  +      while ((heapTime <= currentTime) || (listTime <= currentTime)) {
  +        var timer;
  +        // Consume the timers in order by removing from heap or list based on
  +        // their wakeup time and update the queue's time.
  +        assert((heapTime != listTime) ||
  +               ((_heap.first != null) && (_firstZeroTimer != null)));
  +        if ((heapTime < listTime) ||
  +            ((heapTime == listTime) &&
  +             (_heap.first._id < _firstZeroTimer._id))) {
  +          timer = _heap.removeFirst();
  +          heapTime = _heap.isEmpty ?
  +              (currentTime + 1) : _heap.first._wakeupTime;
           } else {
  -          // We want to drain all entries from the list as they should have
  -          // been pending for 0 ms. To prevent issues with current time moving
  -          // we ensure that the listTime does not go beyond current, unless the
  -          // list is empty.
  -          listTime = _firstZeroTimer._wakeupTime;
  -          if (listTime > currentTime) {
  -            listTime = currentTime;
  +          timer = _firstZeroTimer;
  +          assert(timer._milliSeconds == 0);
  +          _firstZeroTimer = timer._indexOrNext;
  +          if (_firstZeroTimer == null) {
  +            _lastZeroTimer = null;
  +            listTime = currentTime + 1;
  +          } else {
  +            // We want to drain all entries from the list as they should have
  +            // been pending for 0 ms. To prevent issues with current time moving
  +            // we ensure that the listTime does not go beyond current, unless
  +            // the list is empty.
  +            listTime = _firstZeroTimer._wakeupTime;
  +            if (listTime > currentTime) {
  +              listTime = currentTime;
  +            }
             }
           }
  -      }
  -
  -      // Append this timer to the pending timer list.
  -      timer._indexOrNext = null;
  -      if (head == null) {
  -        assert(tail == null);
  -        head = timer;
  -        tail = timer;
  -      } else {
  -        tail._indexOrNext = timer;
  -        tail = timer;
  +
  +        // Append this timer to the pending timer list.
  +        timer._indexOrNext = null;
  +        if (head == null) {
  +          assert(tail == null);
  +          head = timer;
  +          tail = timer;
  +        } else {
  +          tail._indexOrNext = timer;
  +          tail = timer;
  +        }
         }
       }
   
  
positive.code:         _createTimerHandler();
        }
        if (_firstZeroTimer != null) {
          _sendPort.send(null);
        } else {
          var wakeupTime = _heap.first._wakeupTime;
          if ((_scheduledWakeupTime == null) ||
  
negative.code: 
    // Creates a receive port and registers an empty handler on that port. Just
    // the triggering of the event loop will ensure that timers are executed.
    static _ignoreMessage(_) {
      _messagePending = false;
    }
  
    static void _createTimerHandler() {
      assert(_receivePort == null);
      _receivePort = new RawReceivePort(_ignoreMessage);
      _sendPort = _receivePort.sendPort;
      _scheduledWakeupTime = null;
      _messagePending = false;
    }
  
    static void _shutdownTimerHandler() {
  