An s/coll-of with :kind but without :into takes a very long time to generate. You will mostly notice this when using stest/check but here is an example that replicates the important bits:
Cause: If :into is not provided, s/every and s/coll-of has to generate a collection (via gen of list?) to call empty on it, to then fill it up. This is quite clearly documented in the docstring of `s/every`:
Assumedly the list? generates quite large vectors at a certain point which significantly slows down the generation. The responsible code is in gen* of every-impl.
Proposed: Use standard empty coll for persistent collection :kind preds (list? vector? set? map?).
In the patch:
- Create lookup table `empty-coll` for kind-form (resolved pred) to empty coll.
- When possible (if :into coll is specified or kind-form is one of these special cases), determine the empty gen-into collection once at the beginning.
- If empty gen-into collection is available, start with that in the generator. Otherwise, fall back to prior behavior for kind.
Performance-wise, the times after the patch are comparable to times using :into.