# Ordered: a fast sorted collection library for Zig

> Source: <https://ziggit.dev/t/ordered-a-fast-sorted-collection-library-for-zig/18285#post_1>
> Published: 2026-11-09 12:32:54+00:00

Ordered is a Zig library that includes the implementations of sets and maps where elements are sorted by their keys at all times.

The main design decisions for the library were that the API must be simple and uniform (have the same form and facade for different implementations), the implementations must be correct, and efficient (they must be fast and don’t use more memory than needed).

 Some benchmark results for the implementations in Ordered against sorted set and map implementations from similar libraries are available [here](https://cogitatortech.github.io/benchmarks-ordered/).

 Ordered itself is available [here](https://github.com/CogitatorTech/ordered).

Ordered is mainly for Zig 0.16 and 0.17 (but older releases should work with Zig 0.15 too).

I use AI-assisted coding tools for the project. However, I’m very opinionated about how AI should work, and the process involves a lot of back and forth between me and AI. I normally keep the changes small so I can have a look before approving.
