(bash experts) computationally efficient circular buffer?

What is most efficient way in bash to maintain an array of historical values? Oldest value needs to be read from array and newest value appended to the end.

At the moment I have:

(( ${delays[0]} )) && ((sum_delays--))
unset 'delays[0]'
delay=0
(($rtt_delta > $delay_thr)) && delay=1 && ((sum_delays++))
delays+=($delay)
delays=(${delays[*]})

Is there a more efficient way?

Context:

Thanks to some suggestions from @colo and @Alfr on IRC I tried:

(( ${delays[$delays_idx]} )) && ((sum_delays--))
delay=0
(($rtt_delta > $delay_thr)) && delay=1 && ((sum_delays++))
delays[$delays_idx]=$delay
(( delays_idx=(delays_idx+1)%$bufferbloat_detection_window ))

This avoids having to re-index the array, albeit performance seems roughly similar - perhaps because of the overwrite?