Made circular buffer fast