William Grosso wrote:

> Ernest Friedman-Hill wrote:
> >
> > Ouch! This wasn't small at all (at least, effect-wise.) Glad you caught
> > this one. One-line fix: jess/NodeTerm.java:96 -
> >
> > was
> >           for (int i = 0; i<m_activations.size(); i++)
> >
>
> As a side note (irrelevant to JESS),  this line of code is
> fairly slow (and the slowness can't be optimized out by a
> compiler because of threading issues).
>
> The new line
>
> >          for (int i = m_activations.size()-1; i>=0; i--)
>
> is quite a bit faster (only one call to m_activations.size())
>
> Two good Java optimization links are:
>
>         http://www.cs.cmu.edu/~jch/java/optimization.html
>         http://www.ibm.com/Java/education/javahipr.html
>
> William Grosso
> ---------------------------------------------------------------------
> 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