Use bitwise and to calculate index in ws_deque.