immutable-chunkmap
A fast immutable map and set with batch insert and update methods, COW operations, and big O efficient implementations of set and merge operations
2.1.3
5.0M downloads/mo
#4512 most downloaded on crates.io
estokes/immutable-chunkmap
What this package is like to depend on
Last release 1 months ago
08 Jul 2026
Ships fairly regularly
a new release about every 5 months
Nearly every release is documented
notes for 31 of 34 stable releases
4 versions withdrawn
withdrawn after publishing
9 years old
38 releases · first in 2017
4 releases in the last 12 months
see the full history below
Release timeline
38 releases · Dec 2017 to Jul 2026Releases
latest 38-
2.1.308 Jul 2026Release notes
Open source →- when pool is on add support for droping deeply nested maps in constant stack space
-
2.1.210 Sep 2025 -
2.1.109 Sep 2025Release notes
Open source →- stop pooling tree nodes, because of notch analysis they can never meet the safety requirements of IsoPoolable.
-
2.1.030 Aug 2025 withdrawnRelease notes
Open source →-
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
-
-
2.0.621 Oct 2024 -
2.0.520 May 2024Release notes
Open source →-
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
-
-
2.0.404 Feb 2024 -
2.0.303 Feb 2024 -
2.0.223 Oct 2023 -
2.0.123 Oct 2023Release notes
Open source →- implement get_mut_cow to improve the ergonomics of using nested maps with COW operations
-
2.0.022 Jun 2023Release notes
Open source →- 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 wrong. I also got semantic versioning wrong, and I'm really sorry about that, I hope nothing broke annoyingly for anyone (aside from for me :))
-
1.1.120 Jun 2023 withdrawn -
1.1.020 Jun 2023 withdrawn -
1.0.523 Dec 2022Release notes
Open source →- add remove_many, a small wrapper around update_many
- fix a bug in update_many where trying to remove elements that don't exist in the map could cause a panic. Add a test for this case.
-
1.0.403 Sep 2022 -
1.0.329 Aug 2022 -
1.0.228 Aug 2022 -
1.0.124 Sep 2021Release notes
Open source →- replace vec chunks with arrayvec chunks to eliminate an indirection
- implement tree compaction to keep inner chunks from getting too sparse
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!
-
1.0.017 Sep 2021Nothing published for this version
-
0.5.930 Oct 2020Release notes
Open source →- add weak references to maps and sets as well as methods to get the strong and weak count of map/set references.
-
0.5.803 Nov 2019 -
0.5.728 Oct 2019Release notes
Open source →- improve performance of batch update operations on unsorted data by a large amount (7x on trees of size 10million and chunks of size 100k).
-
0.5.621 Oct 2019Release notes
Open source →-
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.
-
-
0.5.514 Oct 2019 -
0.5.413 Feb 2019 -
0.5.321 Jan 2019Release notes
Open source →- 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.
- rename Map::merge to Map::union. Sorry for the tiny break in semantic versioning, but given it was just released I don't think it's a huge problem to change it now.
-
0.5.201 Jan 2019Release notes
Open source →- implement Set::intersect, and Map::intersect, O(log(N) + M) where M is the number of intersecting chunks.
-
0.5.111 Dec 2018Release notes
Open source →- 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 be as fast as update_many from the other map's iterator, a lot faster in the case of a small intersection.
- remove my silly &mut F requirement for closure arguments to functions in the public interface. Sorry I'm still learning rust, I didn't know FnMut was also implemented by a &mut.
-
0.5.020 Jul 2018Release notes
Open source →- implement map get_key, get_full
- implement set update_many
- fix some incorrect documentation
- BREAKING change map and set update functions so they are able to work with borrowed forms of the key
-
0.4.117 Jul 2018Release notes
Open source →- implement get in the set module
- properly implement Ord, PartialOrd, Eq, PartialEq, Hash, and Debug
-
0.4.016 Jul 2018Release notes
Open source →- add a 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 relevant because all the practical applications of this library than I know about require using Arc.
- BREAKING: fix return type of insert and remove to match BTreeMap
-
0.3.113 Jul 2018Release notes
Open source →- fix a bug in update_many that could rarely cause a removed item not to be removed
-
0.3.011 Jul 2018 withdrawnRelease notes
Open source →- BREAKING: change the name of insert_sorted to insert_many
- add update, and update_many
- insert 14% performance improvement
- insert_many 42% performance improvement on unsorted data, now faster than insert on random data
-
0.2.106 Jul 2018Release notes
Open source →- BREAKING: change signature of insert to match BTreeMap as closely as possible. Sorry I was new to rust when I first wrote this module :-(
-
0.2.005 Jul 2018Release notes
Open source →- iteration runs in constant space
- Implement collection range api
- Implement DoubleEndedIterator
- insert_sorted performance improved on degenerate cases
- BREAKING: insert_sorted now takes IntoIterator instead of an explicit slice
- BREAKING: change the name of length to len, like BTreeMap
-
0.1.226 Dec 2017 -
0.1.126 Dec 2017Nothing published for this version
-
0.1.026 Dec 2017Nothing published for this version