> Forcing the negative-scoring rules to run first causes SA to have to scan
the
> whole body twice, (once for the negatives, then once for the positives)
which
> nullifies the speed benefits. If SA did a pass-per-rule you could sort the
> passes and speed it up, but AFAIK SA does the body rules in parallel.

The first part isn't really true as worded/implied.  It has to scan as much
as it needs of the body for every rule, regardless of the order.

What SA is doing currently is wrapping each rule RE into a procedure and
emitting the equivalient of a file with all of those procedures and then
compiling it.  (Actually using a text string and an eval, of course).  After
all the rule procedures of a given type (body, rawbody, etc) it emits one
more procedure.  This procedure just consists of a bunch of lines to call
the other procedures.  Finally SA calls that one procedure, which runs all
of the rules.

        Loren

Reply via email to