Generic primitive array backed array-lists. The pure clojure implementations are a bit slower than the java ones but far less code so these are used for the less-frequently-used primive datatypes - byte, short, char, and float.
Generic primitive array backed array-lists. The pure clojure implementations are a bit slower than the java ones but *far* less code so these are used for the less-frequently-used primive datatypes - byte, short, char, and float.
Fast mutable and immutable associative data structures based on bitmap trie
hashmaps. Mutable pathways implement the java.util.Map
or Set
interfaces
including in-place update features such as compute or computeIfPresent.
Mutable maps or sets can be turned into their immutable counterparts via the
Clojure persistent!
call. This allows working in a mutable space for
convenience and performance then switching to an immutable pathway when
necessary. Note: after persistent!
one should never backdoor mutate map or
set again as this will break the contract of immutability. Immutable
data structures also support conversion to transient via transient
.
Map keysets (.keySet
) are full PersistentHashSet
s of keys.
Maps and sets support metadata but setting the metadata on mutable objects
returns a new mutable object that shares the backing store leading to possible
issues. Metadata is transferred to the persistent versions of the
mutable/transient objects upon persistent!
.
Very fast versions of union, difference and intersection are provided for maps
and sets with the map version of union and difference requiring an extra
argument, a java.util.BiFunction
or an IFn
taking 2 arguments to merge the
left and right sides into the final map. These implementations of union,
difference, and intersection are the fastest implementation of these
operations we know of on the JVM.
Additionally a fast value update pathway is provided, enabling quickly updating all the values in a given map. Additionally, a new map primitive
mapmap
- allows transforming a given map into a new map quickly by
mapping across all the entries.Unlike the standard Java objects, mutation-via-iterator is not supported.
Fast mutable and immutable associative data structures based on bitmap trie hashmaps. Mutable pathways implement the `java.util.Map` or `Set` interfaces including in-place update features such as compute or computeIfPresent. Mutable maps or sets can be turned into their immutable counterparts via the Clojure `persistent!` call. This allows working in a mutable space for convenience and performance then switching to an immutable pathway when necessary. Note: after `persistent!` one should never backdoor mutate map or set again as this will break the contract of immutability. Immutable data structures also support conversion to transient via `transient`. Map keysets (`.keySet`) are full `PersistentHashSet`s of keys. Maps and sets support metadata but setting the metadata on mutable objects returns a new mutable object that shares the backing store leading to possible issues. Metadata is transferred to the persistent versions of the mutable/transient objects upon `persistent!`. Very fast versions of union, difference and intersection are provided for maps and sets with the map version of union and difference requiring an extra argument, a `java.util.BiFunction` or an `IFn` taking 2 arguments to merge the left and right sides into the final map. These implementations of union, difference, and intersection are the fastest implementation of these operations we know of on the JVM. Additionally a fast value update pathway is provided, enabling quickly updating all the values in a given map. Additionally, a new map primitive - [[mapmap]] - allows transforming a given map into a new map quickly by mapping across all the entries. Unlike the standard Java objects, mutation-via-iterator is not supported.
Generialized pathways involving iterators. Sometimes useful as opposed to reductions.
Generialized pathways involving iterators. Sometimes useful as opposed to reductions.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close