Ring buffer benchmark optimization