Skip to content

Releases: bsless/clj-fast

14-04-2022

14 Apr 08:13
Compare
Choose a tag to compare

Add

  • fast-assoc-in
  • fast-update-in
  • definline which accepts multiple arities (no rest args yet)

Benchmarks

  • Complete rewrite with JMH

Fix

  • Bug in inline/assoc-in where falsey values caused exceptions

v.0.0.10

06 Jun 07:50
Compare
Choose a tag to compare

Add

  • Variadic arity assoc-in. The analysis collapses all paths to a tree
    with leaves being the values to be assoc-ed and plans out a minimal
    execution. Also see #23
  • Not found arity to inline/get-in
  • Tests from Clojure's test suit to catch some edge cases
  • Faster update-in which takes advantage of variadic arities, but introduces ugly code duplication
  • Faster versions of subseq/rsubseq which don't use sets for checking
    test functions identity.
  • Static merge in fast-map-merge.
  • as macro for annotating symbols.
  • Box operations which mimic atom and volatile semantics.
  • update-in-> similar to update-in but takes many arguments.
  • kvreduce - dispatches directly to IKVReduce .kvreduce() method instead of going through a protocol.
  • Add fast-count.
  • Add short-circuiting-merge which returns a merge function which short circuits according to count-fn with merge-fn.
  • Add def-short-circuiting-merge as convenience wrapper around short-circuiting-merge for def-ing named functions.

Fix

  • inline/get not-found arity allowed any number of arguments, explicitly changed to one. #24
  • Fix callsite analysis of quoted forms. Now functions calls and quoted forms are handled correctly.
  • inline/assoc-in new implementation did not extract bindings. Fixing
    this allows using side-effecting functions as keys
  • Found an edge-case with adding type hints on inline args - literals
    would lose their inferred types and cause reflection warnings by
    taking on the meta. Narrowed down to cover only symbols.

Improve

  • Relax the constraints in extract-bindings, making it less aggressive
    but still correct.
  • Remove fn allocation in fast-map-merge.
  • Change fast-map-merge to definline.
  • Use kvreduce instead of reduce-kv in fast-map-merge.