Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

LOGIC-50: Rel relation PersistentHashSet becomes LazySeq after issuing a retraction #9

Closed
wants to merge 1 commit into from

2 participants

Aaron Brooks David Nolen
Aaron Brooks

This issue does not affect external correctness but will adversely
affect performance in the presence of duplicated facts.

http://dev.clojure.org/jira/browse/LOGIC-50

Aaron Brooks abrooks retractions: Fix bug converting 'set from PersistentHashSet to LazySeq.
This issue does not affect external correctness but will adversely
affect performance in the presence of duplicated facts.
808987c
David Nolen
Collaborator

Thanks for the patch! I've commented on the JIRA ticket, I'm assuming this is meant to be applied to master? Would it be more useful to you for me to branch this off the 0.7.5 tag and apply it as a fix there and cut a 0.7.6 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 02, 2012
Aaron Brooks abrooks retractions: Fix bug converting 'set from PersistentHashSet to LazySeq.
This issue does not affect external correctness but will adversely
affect performance in the presence of duplicated facts.
808987c
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  src/main/clojure/clojure/core/logic.clj
2  src/main/clojure/clojure/core/logic.clj
@@ -2769,7 +2769,7 @@
2769 2769 (let [rel-ns (:ns (meta rel))
2770 2770 rel-set (var-get (ns-resolve rel-ns (set-sym (.name rel) arity)))
2771 2771 tuples (map vec tuples)]
2772   - (swap! rel-set (fn [s] (remove #(some #{%} tuples) s)))
  2772 + (swap! rel-set (fn [s] (reduce disj s tuples)))
2773 2773 (let [indexes (indexes-for rel arity)]
2774 2774 (doseq [[o i] indexes]
2775 2775 (let [index (var-get (ns-resolve rel-ns (index-sym (.name rel) arity o)))]

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.