add @inbounds to critical statements in deque