Hi David,

Have you ever tried to profile your application? I've used OptimizeIt
for this purpose (www.optimizeit.com) and am reasonably happy with
it. I'd be interested to know where the bottlenecks are in your
particular program. Jess can be used in so many ways that every
program is different.

Jess 5.x improves performance in several areas; if your application
doesn't hit any of these bottlenecks, then it wouldn't be any faster,
I suppose.

The first area is function calls. The 5.x function call mechanism is much
faster. The examples/wordgame problem, which uses so many that in 4.4
function-call performance was a bottleneck, runs about 20% faster
under Jess 5.x. The zebra problem is about 30% faster, also for this
reason. 

The second area is Rete-memory indexing. This is a large component of
the "manners" performance, but also speeds up the "hard" example,
which is close to three times faster. Jess uses some general
techniques and some specific optimizations; it's hit-or-miss whether
any of these specific optimizations apply to you. I suppose I could
write a guide about these and how to exploit them. ANyway, they only
apply if your rulesgenerate lots of partial matches.

The third is agenda and fact-list handling. These together form a
component of the "manners" performance, but also speed up the
"fullmab" example. This is more than three times faster under Jess
5.x. I tend to think of fullmab as the quintessential example of the
kinds of programs real users write. To exploit the full advantages of
the improved fact-list handling, you can make the
(set-fact-duplication TRUE) call. So long as your application doesn't
normally assert duplicate facts and rely on Jess to reject the
duplicates, this will be fine, and can siginificantly speed up many
applications. 

A fourth is multithreaded I/O. Fullmab is more or less I/O bound under
Jess 4.4. In Jess 5.x, it calls (set-multithreaded-io TRUE) which
basically just arranges for "printout" to flush its output in a
separate Thread. The result is a large speedup (especially on a
multiprocessor machine.)

Anyway, if you have any idea what your rate-limiting step is, I'd be
interested in knowing.

I think David E. Young wrote:
> 
> >>>>> "Ernest" == Ernest Friedman-Hill <[EMAIL PROTECTED]> writes:
> 
> Ernest> Hi Norman, Well, in general, as you can imagine, my efforts
> Ernest> have been directed towards improving, rather than degrading,
> Ernest> performance...
> 
> Ernest> This being said, I'm very interested in your report. It's
> Ernest> entirely possible that there is a perfectly reasonable class
> Ernest> of application for which Jess 5.x is slower...
> 
> I'd like to toss in my contribution here. We recently migrated our
> application ("server-class", ~800 rules partitioned among multiple
> Rete instances) to 5.0a6. Using our own "benchmarks", I compared
> performance to Jess 4.4, and while I did not see a performance
> degradation, I've also not seen an improvement. All of this occurs on
> Solaris JDK 1.2 (JIT, native threads).
> 
> Not being *unhappy* with our application's performance, I only mention
> this because I'm curious if our software falls within the "reasonable
> class of application".
> 
> FWIW.
> 
> Regards,
> 
> -- 
> 
> -----------------------------------------------------------------
> David E. Young
> Fujitsu Network Communications  "The fact that ... we still
> ([EMAIL PROTECTED])          live well cannot ease the pain of
>                                  feeling that we no longer live nobly."
>                                   -- John Updike
> "Programming should be fun,
>  programs should be beautiful"
>   -- P. Graham
> ---------------------------------------------------------------------
> 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  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to