aboutsummaryrefslogtreecommitdiff
path: root/lib/std/deque.zig
AgeCommit message (Collapse)Author
2025-09-20std: remove loop from growCapacityAndrew Kelley
I measured this against master branch and found no statistical difference. Since this code is simpler and logically superior due to always leaving sufficient unused capacity when growing, it is preferred over status quo.
2025-08-26Compilation: use std.DequeIsaac Freund
And delete DeprecatedLinearFifo from the source tree.
2025-08-25std: add a Deque data structureIsaac Freund
This is my penance for baiting andrew into deleting the existing generic queue data structures with my talk of "too many ring buffers". The new Reader and Writer interfaces are excellent ring buffers for many use cases, but a generic queue container type is now missing. This new double-ended queue, known more succinctly as a deque, is implemented from scratch based on the API design lessons learned from ArrayList over the years. The API is not yet as featureful as ArrayList, but the core functionality is in place and I will be using this in my personal projects shortly. I think it makes sense to add further functions as needed based on real-world use-cases.