I am not an expert but I think that the second form would be better and
faster because it reduces the number of partial matches that would be
generated if you had *many* facts like (something ?s) (although asserting
the facts may be negligably slower.) Someone correct me if I am wrong.

If you only expect a single fact of that form to exist at any one time, then
it might be a toss up...

For more information, see the readme file which contains a good description
of the rete network for some insight on why this is so.

alanm

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Christo Andonyadis
> Sent: Friday, April 23, 1999 3:19 PM
> To: [EMAIL PROTECTED]
> Subject: JESS: Better?
>
>
> Which is better/faster:
>
> (something ?s)
> =>
> (if (eq ?s nothing) then
>       (assert (somethingelse nothingatall))
> )
>
> OR
>
> (something ?s&:(eq ?s nothing))
> =>
> (assert (somethingelse nothingatall))
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. 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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to