taoensso.nippy.utils documentation

bench

macro

(bench num-laps form & {:keys [warmup-laps num-threads as-ns?]})
Repeatedly executes form and returns time taken to complete execution.

case-eval

macro

(case-eval e & clauses)
Like `case` but evaluates test constants for their compile-time value.

memoized

(memoized cache f & args)
Like `memoize` but takes an explicit cache atom (possibly nil) and
immediately applies memoized f to given arguments.

repeatedly-into

(repeatedly-into coll n f)
Like `repeatedly` but faster and `conj`s items into given collection.

time-ns

macro

(time-ns & body)
Returns number of nanoseconds it takes to execute body.

version-compare

(version-compare x y)
Comparator for version strings like x.y.z, etc.