Fork me on GitHub
#clojure-spec
<
2019-05-17
>
vemv10:05:02

Is there a performance difference between running essentially the same spec checking via instrumentation, vs. via :pre?

andy.fingerhut19:05:02

For a general spec, I have no idea. For a very specific very simple spec of checking whether some clojure.set functions are given arguments return true for the predicate set? or not, there is a pretty big performance difference I measured, with measurements given starting in about the second screenful of the README for this project: https://github.com/jafingerhut/funjible

vemv18:05:05

nice one! But my question was focused on instrumentation vs :pre. Guess I can try it myself though

kszabo11:05:25

Am I right to assume that until spec2 gets finished the way to go to emulate s/schema behavior is to only define (s/keys :opt [:schema/values]) kind of specs and use fdefs with use-case specific :req specs?

kszabo11:05:09

that way those can be later transformed in s/select’s