I have the following scenario. I have about 72K facts, divided into two
groups, A and B. I'm looking to find the pairs of A and B based on the
relationship between one of the slots. In one case, my test is equality
between the two slots and in another it is based on a function that
checks for similarity rather than equality. E.g.
Equality Test:
(MetricValue (name "foo")
(group "A")
(value ?A_val)
(testslot ?A_testslot)
)
(MetricValue (name "foo")
(group "B")
(value ?B_val)
(testslot ?A_testslot)
)
(test (> ?A_val ?B_Val))
Function Test:
(MetricValue (name "foo")
(group "A")
(testslot ?A_testslot)
)
(MetricValue (name "foo")
(group "B")
(testslot ?B_testslot&:(similar ?B_testslot
?A_testslot) )
)
(test (> ?A_val ?B_Val))
The performance of the second version is much slower, especially as the
number of facts increases. Is this just the overhead of my function call
vs. "equals". Does anyone have suggestions about possible restructuring
of the problem that might minimize the calls necessary?.
As a side note, I'm noticing that the performance of Jess7.1p1 is slower
than 70p2. I was expecting a performance increase because of the use
of the "test" CE but that doesn't seem to be making a difference.
-Russ