Legend:
Library
Module
Module type
Parameter
Class
Class type
This module implements a mutable FIFO queue, like OCaml's Queue module. In comparison with Queue, it uses a more compact internal representation: elements are stored contiguously in an array. This has a positive impact on performance: both time and memory consumption are reduced.
The implementation is optimized for maximum throughput. The internal array is never shrunk, so a queue that has contained many elements in the past remains large. Furthermore, array slots are not overwritten when elements are extracted; thus, an element that has appeared in the queue in the past can remain reachable. These drawbacks are usually acceptable provided that the queue is thrown away after use.