speculative

https://github.com/borkdude/speculative
borkdude 2018-11-04T22:22:30.030700Z

I also did a little experiment: if you call something like (= 1 1) while = is instrumented, how many times does the instrumented version of = get called by spec internals? This is 73 times (excluding the 1 call I did myself).

borkdude 2018-11-04T22:25:26.031500Z

For count this number was 1. For get this number was 112.

borkdude 2018-11-04T22:26:11.032300Z

My thought was to use these numbers to give an fdef a cost value. And you could say: I don’t want to instrument functions with cost higher than 10.

borkdude 2018-11-04T22:26:40.032700Z

But this is ClojureScript specific, so I don’t know if it makes sense to do this for Clojure as well.