I think (test (eq* ?X "ABC")) may be fast because, (test (= 0 (str-compare
?X "ABC"))) requires one extra operation.
Hope that helps
-----Original Message-----
From: Mike Leiper [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 5:39 PM
To: Jess Users
Subject: JESS: eq* vs. str-compare
Am I correct in assuming that the following 2 alternatives for comparing
string values
produce the same results in JESS? Note, bind variable ?X is bound to a
STRING slot value.
(test (eq* ?X "ABC"))
(test (= 0 (str-compare ?X "ABC")))
If so, what are the advantages of using 1 versus the other? Is there a
performance difference?
Thanks in advance,
mike
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------