Fork me on GitHub
#datascript
<
2017-04-28
>
misha11:04:51

is there a cheaper way to get list of parent ids by child ids, than reducing over all of the datoms?

misha12:04:42

for 60k datoms db in clj times (dotimes 1) are

"Elapsed time: 0.337429 msecs" ;; filter datoms
"Elapsed time: 0.703007 msecs" ;; mapcat filtered datoms
"Elapsed time: 0.217288 msecs" ;; filtered db.
also mapcat (second) gives invalid results, so there might be a bug in my code above.