On Sep 3, 2008, at 12:54 PM, [EMAIL PROTECTED] wrote:
Is the equality comparison using "==" or "equals"?
It's jess.Value.equals(), which uses == for INTEGER, FLOAT, LONG, etc,
but equals() for object types.
-Russ
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ernest Friedman-Hill
Sent: Friday, August 29, 2008 2:26 PM
To: jess-users
Subject: Re: JESS: Performance question
On Aug 29, 2008, at 12:58 PM, [EMAIL PROTECTED] wrote:
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?.
For an equality comparison, Jess can use the hashcodes of the tested
values to sort the facts into bins, and then actually do the
comparison
on only a comparatively small fraction of th facts. This is a big win.
For a function, though, Jess has to do *all* the comparisons, since it
doesn't know how to organize the data to eliminate any.
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.
Jess 7.1 has a lot of different optimizations, some for speed, some
for
space, and there's always a tradeoff between these two. Some
programs do
run faster (some *much* faster), while others might run a little
slower.
If you're seeing a nontrivial slowdown, though, I'd be interested in
hearing the details.
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories PO Box
969, MS 9012, Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
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]
--------------------------------------------------------------------
--------------------------------------------------------------------
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]
.
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
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]
--------------------------------------------------------------------