diff --git a/CHANGES.md b/CHANGES.md index 09f712e..f0cc5fb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,7 @@ * Added :notpath metadata to signify pathedfn arguments that should be treated as regular arguments during inline factoring. If one of these arguments is not a static var reference or non-collection value, the path will not factor. * Bug fix: `transformed` transform-fn no longer factors into `pred` when an anonymous function during inline factoring * Bug fix: Fixed nil->val to not replace the val on `false` -* Bug fix: Eliminate reflection when using primitive paramaters in an inline cached path +* Bug fix: Eliminate reflection when using primitive parameters in an inline cached path ## 0.11.0 * New `path` macro does intelligent inline caching of the provided path. The path is factored into a static portion and into params which may change on each usage of the path (e.g. local parameters). The static part is factored and compiled on the first run-through, and then re-used for all subsequent invocations. As an example, `[ALL (keypath k)]` is factored into `[ALL keypath]`, which is compiled and cached, and `[k]`, which is provided on each execution. If it is not possible to precompile the path (e.g. [ALL some-local-variable]), nothing is cached and the path will be compiled on each run-through. diff --git a/scripts/benchmarks.clj b/scripts/benchmarks.clj index 475413c..4396209 100644 --- a/scripts/benchmarks.clj +++ b/scripts/benchmarks.clj @@ -31,7 +31,7 @@ (time-ms amt-per-iter afn)))) (defn compare-benchmark [amt-per-iter afn-map] - (let [results (transform [ALL LAST] + (let [results (transform MAP-VALS (fn [afn] (average-time-ms 8 amt-per-iter afn)) afn-map)