This repository was archived by the owner on May 3, 2026. It is now read-only.
12.0.0
Starting with this release, the arc flag is gone, in favour of publishing im as two separate crates: im (using Arc) and im-rc (using Rc). They're identical (and built from the same code), except that im is thread safe and im-rc is a little bit more performant.
This is a major release as a consequence, but there should be no breaking code changes other than the new default choice of reference counter.
Added
- The
Chunkdatatype that's used to buildVectorandOrdMaphas been exposed and made generally usable. It's somewhere between aGenericArrayand a ring buffer, offers O(1)* push in either direction, and is generally hyperoptimised for its purpose of serving as nodes for Bagwell tries, but it's also a powered up version ofGenericArraythat might be useful to others, hence the public API. Vectornow hasFocusandFocusMutAPIs for caching index lookups, yielding huge performance gains when performing multiple adjacent index lookups.Vector::iterhas been reimplemented using this API, and is now much simpler and about twice as fast as a result, andVector::iter_mutnow runs nearly an order of magnitude faster. Likewise,Vector::sortandVector::retainare now usingFocusMutand run considerably faster as a result.FocusandFocusMutcan also be used as stand ins for subslices through thenarrowandsplit_atmethods. You can also iterate over foci, making this the most efficient way to iterate over a subset of aVector.Vectornow implements Rayon's parallel iterators behind therayonfeature flag.
Changed
- As
std::ops::RangeBoundsis now stabilised in Rust 1.28, theVector::slicemethod is now unconditionally available on the stable channel. - Union/difference/intersection/is_submap methods on
HashMapandOrdMapthat take functions now takeFnMutinstead ofFn. This should not affect any existing code. (#34) Vector::split_offcan now take an index equal to the length of the vector, yielding an empty vector as the split result. (#33)Vector::setnow returns the replaced value.
Fixed
Vectoris now represented as a single inline chunk until it grows larger than the chunk size, making it even faster thanVecat small sizes, thoughclonecould now be slower if the clone is expensive (it's still absurdly fast forA: Copy).