NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4636 most downloaded on crates.io
A fast immutable map and set with batch insert and update methods, COW operations, and big O efficient implementations of set and merge operations
Last release 25 days ago
13 Sep 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 32 of 35 stable releases
4 versions withdrawn
withdrawn after publishing
9 years old
39 releases · first in 2017
expose the tree's structure for codecs that preserve sharing: Map::root/Set::root give a NodeRef (identity, pairs, subtrees, keep), unsafe NodeHandle:
Map::root/Set::root give a NodeRef (identity, pairs, subtrees,
keep), unsafe NodeHandle::create rebuilds a node the caller
vouches for, Map::from_root/Set::from_root assemble the mapwhen pool is on add support for droping deeply nested maps in constant stack space
One column per quarter.
fix unsoundness pooling tree nodes, now reenabled
stop pooling tree nodes, because of notch analysis they can never meet the safety requirements of IsoPoolable.
add an optional feature "pool". If enabled memory allocation is greatly reduced by reusing tree components instead of freeing them. The performance im
add an optional feature "pool". If enabled memory allocation is greatly reduced by reusing tree components instead of freeing them. The performance improvement depends on key type and tree size but can be as high as %30 for plain insert/remove on very large maps. Memory fragmentation will also be greatly reduced, but this is much harder to measure.
pool is not compatible with no_std
fix a number of test bugs (actual bugs in the TEST code, not the tree) that cropped up when running model checking for multiple days continuously
merge #10, no_std support (alloc required)
merge #8 hand coded packing of height/size to remove the dependency on packed struct
merge #8 hand coded packing of height/size to remove the dependency on packed struct
fix a few bugs in the model checking COW tests
remove redundant type parameter from iter_mut_cow
implement iter_mut_cow, range_mut_cow, for copy on write iterators
implement get_or_insert_cow and get_or_default_cow
implement get_mut_cow to improve the ergonomics of using nested maps with COW operations
fix the range api to match the standard library. Sorry about the previous two releases, it's actually quite a subtle api and I consistently got it wro
* fix ?Sized on range
fix the arguments to range to have the correct borrow type
add remove_many, a small wrapper around update_many
add optional rayon support for map and set
add optional serde support for map and set
stop depending on serde by default
replace vec chunks with arrayvec chunks to eliminate an indirection
1.0.0 "the cake is not a lie"
Add copy on write mutable operations. They are 10x faster than plain insert/remove, and bring update performance within an 2-3x of BTreeMap (with ArcStr keys).
Chunk size is now configurable with a const generic parameter. Three different sizes are exposed as default type aliases.
bump dependencies, update readme, and refresh the benchmarks
feels like 1.0 to me!
Nothing published for this version
add weak references to maps and sets as well as methods to get the strong and weak count of map/set references.
further 20% performance improvement on batch update operations.
improve performance of batch update operations on unsorted data by a large amount (7x on trees of size 10million and chunks of size 100k).
packed the height and length together, which reduced the size of nodes by 1 word. That reduction gets us a 1-2% improvement in lookup times (more bene
packed the height and length together, which reduced the size of nodes by 1 word. That reduction gets us a 1-2% improvement in lookup times (more benefit for larger trees). Tree length is now limited to 2^56 elements instead of usize::MAX elements.
made the tests run faster by wrapping strings in Arcs, which is closer to how you'd use them in a real program anyway.
small performance optimizations update operations
* Edition 2018
implement Set::diff, and Map::diff, O(log(N) + M) where M is the number of intersecting chunks. Now all the fundamental set operations are implemented
implement Set::intersect, and Map::intersect, O(log(N) + M) where M is the number of intersecting chunks.
implement Set::union, and Map::merge, O(log(N) + M) where M is the number of intersecting chunks and N is the size of the largest tree. Should always
BREAKING change map and set update functions so they are able to work with borrowed forms of the key
implement get in the set module
remove the rc and arc modules. There is no observable performance difference between rc and arc, so just use arc everywhere. This is especially releva
fix a bug in update_many that could rarely cause a removed item not to be removed
BREAKING: change the name of insert_sorted to insert_many
BREAKING: change signature of insert to match BTreeMap as closely as possible. Sorry I was new to rust when I first wrote this module :-(
iteration runs in constant space
* Initial public release
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →