             result))))))
 
 
-(defn collect [context syms]
+(defn collect-to [context syms acc xfs]
   (perf/measure
     (if (:empty? context)
-      (fast-set)
+      acc
       (let [syms-indexed (vec (shim/zip syms (range)))
             specimen     (shim/make-array (count syms))
             _            (collect-consts syms-indexed specimen (:consts context))
             related-rels (related-rels context syms)
             xfs          (-> (map #(collect-rel-xf syms-indexed %) related-rels)
-                             (concat [(map vec)]))]
-        (into (fast-set) (apply comp xfs) [specimen])))
-   "collect"))
+                             (concat xfs))]
+        (into acc (apply comp xfs) [specimen])))
+   "collect-to"))
 
 
 ;; Query
+
 
 (def query-cache (volatile! (datascript.lru/lru lru-cache-size)))
 

                     "resolve-clauses")
          syms     (concat (dp/find-vars (:find parsed-q))
                           (map :symbol (:with parsed-q)))]
      (native-coll (collect context syms)))
    "Query" q))



                      (fn [set tuple]
                        (conj! set (getter tuple))))
               (persistent!)))))
    (collect-to context syms (fast-set) [(map vec)])))


(defn subtract-from-rel [rel syms exclude-key-set]
