Ham-Fisted 2.019
High Performance Clojure Primitives.
Topics
Namespaces
ham-fisted.api
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.
Public variables and functions:
- ->collection
- ->random-access
- ->reducible
- add-all!
- apply-concat
- apply-concatv
- argsort
- array-list
- assoc!
- binary-search
- boolean-array
- boolean-array-list
- byte-array
- byte-array-list
- char-array
- char-array-list
- clear!
- clear-memoized-fn!
- concata
- concatv
- conj!
- constant-count
- constant-countable?
- custom-counted-ireduce
- custom-ireduce
- darange
- dbl-ary-cls
- difference
- dnth
- double-array
- double-array-list
- drop
- drop-last
- drop-min
- dvec
- empty-map
- empty-set
- empty-vec
- empty?
- evict-memoized-call
- filterv
- first
- float-array
- float-array-list
- fnth
- freq-reducer
- frequencies
- fvec
- group-by
- group-by-consumer
- group-by-reduce
- group-by-reducer
- hash-map
- iarange
- immut-list
- immut-map
- immut-set
- in-fork-join-task?
- inc-consumer
- inc-consumer-reducer
- int-array
- int-array-list
- intersect-sets
- intersection
- inth
- into
- into-array
- ivec
- java-concurrent-hashmap
- java-hashmap
- java-hashset
- java-linked-hashmap
- keys
- larange
- last
- linked-hashmap
- lnth
- long-array
- long-array-list
- lvec
- make-map-entry
- map-intersection
- map-union
- map-union-java-hashmap
- mapmap
- mapv
- mean
- memoize
- memoize-cache-as-map
- merge
- merge-with
- mmax-idx
- mmax-key
- mmin-idx
- mmin-key
- mode
- mut-hashtable-map
- mut-list
- mut-long-hashtable-map
- mut-long-map
- mut-map
- mut-map-rf
- mut-map-union!
- mut-set
- mutable-map?
- obj-ary
- object-array
- object-array-list
- ovec
- persistent!
- pgroups
- pmap
- pmap-opts
- range
- reduced->
- reindex
- repeat
- rest
- reverse
- short-array
- short-array-list
- shuffle
- sort
- sort-by
- sorta
- splice
- subvec
- sum
- sum-fast
- sum-stable-nelems
- take
- take-last
- take-min
- transient
- transient-map-rf
- union
- union-reduce-maps
- update-vals
- update-values
- upgroups
- upmap
- vals
- vec
- vector
- wrap-array
- wrap-array-growable
ham-fisted.function
Helpers for working with java.util.function package objects.
Public variables and functions:
- ->bi-function
- ->function
- ->long-predicate
- bi-consumer
- bi-function
- binary-operator
- binary-predicate
- binary-predicate-or-null
- comp-nan-first
- comp-nan-last
- consumer
- double->long
- double->obj
- double-binary-operator
- double-consumer
- double-predicate
- double-unary-operator
- function
- long->double
- long->obj
- long-binary-operator
- long-consumer
- long-predicate
- long-unary-operator
- make-comparator
- make-double-comparator
- make-long-comparator
- obj->double
- obj->long
- predicate
- rcomp
- unary-operator
ham-fisted.hlet
Extensible let to allow efficient typed destructuring.
Public variables and functions:
ham-fisted.lazy-noncaching
Lazy, noncaching implementation of many clojure.core functions. There are several benefits of carefully constructed lazy noncaching versions:
Public variables and functions:
- ->collection
- ->iterable
- ->random-access
- ->reducible
- apply-concat
- as-random-access
- cartesian-map
- concat
- concat-opts
- constant-count
- constant-countable?
- empty-vec
- every?
- filter
- into-array
- make-readonly-list
- map
- map-indexed
- map-reducible
- object-array
- partition-all
- partition-by
- reindex
- remove
- repeatedly
- seed->random
- shift
- shuffle
- tuple-map
- type-single-arg-ifn
- type-zero-arg-ifn
ham-fisted.mut-map
Functions for working with java's mutable map interface
Public variables and functions:
ham-fisted.primitive-invoke
For statically traced calls the Clojure compiler calls the primitive version of type-hinted functions and this makes quite a difference in tight loops. Often times, however, functions are passed by values or returned from if-statements and then you need to explicitly call the primitive overload - this makes that pathway less verbose. Functions must first be check-casted to their primitive types and then calling them will use their primitive overloads avoiding all casting.
Public variables and functions:
- ->d
- ->dd
- ->ddd
- ->dddd
- ->ddddd
- ->ddddl
- ->ddddo
- ->dddl
- ->dddld
- ->dddll
- ->dddlo
- ->dddo
- ->dddod
- ->dddol
- ->dddoo
- ->ddl
- ->ddld
- ->ddldd
- ->ddldl
- ->ddldo
- ->ddll
- ->ddlld
- ->ddlll
- ->ddllo
- ->ddlo
- ->ddlod
- ->ddlol
- ->ddloo
- ->ddo
- ->ddod
- ->ddodd
- ->ddodl
- ->ddodo
- ->ddol
- ->ddold
- ->ddoll
- ->ddolo
- ->ddoo
- ->ddood
- ->ddool
- ->ddooo
- ->dl
- ->dld
- ->dldd
- ->dlddd
- ->dlddl
- ->dlddo
- ->dldl
- ->dldld
- ->dldll
- ->dldlo
- ->dldo
- ->dldod
- ->dldol
- ->dldoo
- ->dll
- ->dlld
- ->dlldd
- ->dlldl
- ->dlldo
- ->dlll
- ->dllld
- ->dllll
- ->dlllo
- ->dllo
- ->dllod
- ->dllol
- ->dlloo
- ->dlo
- ->dlod
- ->dlodd
- ->dlodl
- ->dlodo
- ->dlol
- ->dlold
- ->dloll
- ->dlolo
- ->dloo
- ->dlood
- ->dlool
- ->dlooo
- ->do
- ->dod
- ->dodd
- ->doddd
- ->doddl
- ->doddo
- ->dodl
- ->dodld
- ->dodll
- ->dodlo
- ->dodo
- ->dodod
- ->dodol
- ->dodoo
- ->dol
- ->dold
- ->doldd
- ->doldl
- ->doldo
- ->doll
- ->dolld
- ->dolll
- ->dollo
- ->dolo
- ->dolod
- ->dolol
- ->doloo
- ->doo
- ->dood
- ->doodd
- ->doodl
- ->doodo
- ->dool
- ->doold
- ->dooll
- ->doolo
- ->dooo
- ->doood
- ->doool
- ->doooo
- ->l
- ->ld
- ->ldd
- ->lddd
- ->ldddd
- ->ldddl
- ->ldddo
- ->lddl
- ->lddld
- ->lddll
- ->lddlo
- ->lddo
- ->lddod
- ->lddol
- ->lddoo
- ->ldl
- ->ldld
- ->ldldd
- ->ldldl
- ->ldldo
- ->ldll
- ->ldlld
- ->ldlll
- ->ldllo
- ->ldlo
- ->ldlod
- ->ldlol
- ->ldloo
- ->ldo
- ->ldod
- ->ldodd
- ->ldodl
- ->ldodo
- ->ldol
- ->ldold
- ->ldoll
- ->ldolo
- ->ldoo
- ->ldood
- ->ldool
- ->ldooo
- ->ll
- ->lld
- ->lldd
- ->llddd
- ->llddl
- ->llddo
- ->lldl
- ->lldld
- ->lldll
- ->lldlo
- ->lldo
- ->lldod
- ->lldol
- ->lldoo
- ->lll
- ->llld
- ->llldd
- ->llldl
- ->llldo
- ->llll
- ->lllld
- ->lllll
- ->llllo
- ->lllo
- ->lllod
- ->lllol
- ->llloo
- ->llo
- ->llod
- ->llodd
- ->llodl
- ->llodo
- ->llol
- ->llold
- ->lloll
- ->llolo
- ->lloo
- ->llood
- ->llool
- ->llooo
- ->lo
- ->lod
- ->lodd
- ->loddd
- ->loddl
- ->loddo
- ->lodl
- ->lodld
- ->lodll
- ->lodlo
- ->lodo
- ->lodod
- ->lodol
- ->lodoo
- ->lol
- ->lold
- ->loldd
- ->loldl
- ->loldo
- ->loll
- ->lolld
- ->lolll
- ->lollo
- ->lolo
- ->lolod
- ->lolol
- ->loloo
- ->loo
- ->lood
- ->loodd
- ->loodl
- ->loodo
- ->lool
- ->loold
- ->looll
- ->loolo
- ->looo
- ->loood
- ->loool
- ->loooo
- ->od
- ->odd
- ->oddd
- ->odddd
- ->odddl
- ->odddo
- ->oddl
- ->oddld
- ->oddll
- ->oddlo
- ->oddo
- ->oddod
- ->oddol
- ->oddoo
- ->odl
- ->odld
- ->odldd
- ->odldl
- ->odldo
- ->odll
- ->odlld
- ->odlll
- ->odllo
- ->odlo
- ->odlod
- ->odlol
- ->odloo
- ->odo
- ->odod
- ->ododd
- ->ododl
- ->ododo
- ->odol
- ->odold
- ->odoll
- ->odolo
- ->odoo
- ->odood
- ->odool
- ->odooo
- ->ol
- ->old
- ->oldd
- ->olddd
- ->olddl
- ->olddo
- ->oldl
- ->oldld
- ->oldll
- ->oldlo
- ->oldo
- ->oldod
- ->oldol
- ->oldoo
- ->oll
- ->olld
- ->olldd
- ->olldl
- ->olldo
- ->olll
- ->ollld
- ->ollll
- ->olllo
- ->ollo
- ->ollod
- ->ollol
- ->olloo
- ->olo
- ->olod
- ->olodd
- ->olodl
- ->olodo
- ->olol
- ->olold
- ->ololl
- ->ololo
- ->oloo
- ->olood
- ->olool
- ->olooo
- ->ood
- ->oodd
- ->ooddd
- ->ooddl
- ->ooddo
- ->oodl
- ->oodld
- ->oodll
- ->oodlo
- ->oodo
- ->oodod
- ->oodol
- ->oodoo
- ->ool
- ->oold
- ->ooldd
- ->ooldl
- ->ooldo
- ->ooll
- ->oolld
- ->oolll
- ->oollo
- ->oolo
- ->oolod
- ->oolol
- ->ooloo
- ->oood
- ->ooodd
- ->ooodl
- ->ooodo
- ->oool
- ->ooold
- ->oooll
- ->ooolo
- ->ooood
- ->ooool
- d
- dd
- ddd
- dddd
- ddddd
- ddddl
- ddddo
- dddl
- dddld
- dddll
- dddlo
- dddo
- dddod
- dddol
- dddoo
- ddl
- ddld
- ddldd
- ddldl
- ddldo
- ddll
- ddlld
- ddlll
- ddllo
- ddlo
- ddlod
- ddlol
- ddloo
- ddo
- ddod
- ddodd
- ddodl
- ddodo
- ddol
- ddold
- ddoll
- ddolo
- ddoo
- ddood
- ddool
- ddooo
- dl
- dld
- dldd
- dlddd
- dlddl
- dlddo
- dldl
- dldld
- dldll
- dldlo
- dldo
- dldod
- dldol
- dldoo
- dll
- dlld
- dlldd
- dlldl
- dlldo
- dlll
- dllld
- dllll
- dlllo
- dllo
- dllod
- dllol
- dlloo
- dlo
- dlod
- dlodd
- dlodl
- dlodo
- dlol
- dlold
- dloll
- dlolo
- dloo
- dlood
- dlool
- dlooo
- do
- dod
- dodd
- doddd
- doddl
- doddo
- dodl
- dodld
- dodll
- dodlo
- dodo
- dodod
- dodol
- dodoo
- dol
- dold
- doldd
- doldl
- doldo
- doll
- dolld
- dolll
- dollo
- dolo
- dolod
- dolol
- doloo
- doo
- dood
- doodd
- doodl
- doodo
- dool
- doold
- dooll
- doolo
- dooo
- doood
- doool
- doooo
- l
- ld
- ldd
- lddd
- ldddd
- ldddl
- ldddo
- lddl
- lddld
- lddll
- lddlo
- lddo
- lddod
- lddol
- lddoo
- ldl
- ldld
- ldldd
- ldldl
- ldldo
- ldll
- ldlld
- ldlll
- ldllo
- ldlo
- ldlod
- ldlol
- ldloo
- ldo
- ldod
- ldodd
- ldodl
- ldodo
- ldol
- ldold
- ldoll
- ldolo
- ldoo
- ldood
- ldool
- ldooo
- ll
- lld
- lldd
- llddd
- llddl
- llddo
- lldl
- lldld
- lldll
- lldlo
- lldo
- lldod
- lldol
- lldoo
- lll
- llld
- llldd
- llldl
- llldo
- llll
- lllld
- lllll
- llllo
- lllo
- lllod
- lllol
- llloo
- llo
- llod
- llodd
- llodl
- llodo
- llol
- llold
- lloll
- llolo
- lloo
- llood
- llool
- llooo
- lo
- lod
- lodd
- loddd
- loddl
- loddo
- lodl
- lodld
- lodll
- lodlo
- lodo
- lodod
- lodol
- lodoo
- lol
- lold
- loldd
- loldl
- loldo
- loll
- lolld
- lolll
- lollo
- lolo
- lolod
- lolol
- loloo
- loo
- lood
- loodd
- loodl
- loodo
- lool
- loold
- looll
- loolo
- looo
- loood
- loool
- loooo
- od
- odd
- oddd
- odddd
- odddl
- odddo
- oddl
- oddld
- oddll
- oddlo
- oddo
- oddod
- oddol
- oddoo
- odl
- odld
- odldd
- odldl
- odldo
- odll
- odlld
- odlll
- odllo
- odlo
- odlod
- odlol
- odloo
- odo
- odod
- ododd
- ododl
- ododo
- odol
- odold
- odoll
- odolo
- odoo
- odood
- odool
- odooo
- ol
- old
- oldd
- olddd
- olddl
- olddo
- oldl
- oldld
- oldll
- oldlo
- oldo
- oldod
- oldol
- oldoo
- oll
- olld
- olldd
- olldl
- olldo
- olll
- ollld
- ollll
- olllo
- ollo
- ollod
- ollol
- olloo
- olo
- olod
- olodd
- olodl
- olodo
- olol
- olold
- ololl
- ololo
- oloo
- olood
- olool
- olooo
- ood
- oodd
- ooddd
- ooddl
- ooddo
- oodl
- oodld
- oodll
- oodlo
- oodo
- oodod
- oodol
- oodoo
- ool
- oold
- ooldd
- ooldl
- ooldo
- ooll
- oolld
- oolll
- oollo
- oolo
- oolod
- oolol
- ooloo
- oood
- ooodd
- ooodl
- ooodo
- oool
- ooold
- oooll
- ooolo
- ooood
- ooool
ham-fisted.reduce
Protocol-based parallel reduction architecture and helper functions.
Public variables and functions:
- ->consumer
- bind-double-consumer-reducer!
- compose-reducers
- consume!
- consumer-accumulator
- consumer-preducer
- consumer-reducer
- double-accumulator
- double-consumer-accumulator
- double-consumer-preducer
- double-consumer-reducer
- immut-map-kv
- indexed-accum
- indexed-double-accum
- indexed-long-accum
- long-accumulator
- long-consumer-accumulator
- long-consumer-reducer
- options->parallel-options
- parallel-reducer
- preduce
- preduce-reducer
- preduce-reducers
- reduce-reducer
- reduce-reducers
- reducer->completef
- reducer->rf
- reducer-with-finalize
- reducer-xform->reducer
- reducible-merge