[rules-users] calling function in When which one is faster

Wolfgang Laun wolfgang.laun at gmail.com
Fri Feb 14 03:01:13 EST 2014


NO, I did NOT mistype. But I also wrote "probably".

Your three alternatives aren't even exchangeable. For a serious
discussion, provide a complete code example with true, exchangeable
alternatives and then one might benchmark.

The myth that eval is "the slowest of all possibilities" is due to
imprecise statements from people not taking enough time to write. The
truth is that constraints where indexing is possible are faster than
anything else. Among the runners-up, it depends on the complexity of
the inner workings, which depend on the CE type and may vary between
versions. eval() is just a simple boolean expression, akin to any
regular constraint where indexing does not apply. Whether JITting or
some interpretation applies also depends on the Drools version and
what not, so, once more: only benchmarking tells you hard facts.

-W


On 14/02/2014, wtang <wtang at kana.com> wrote:
> Sorry, just double check to see if you miss typed --
>
> Do you mean eval() is the slowest and has the most overhead?
>
> Your reply seems to say opposite and said that eval() is the faster and
> have
> the least overhead.
>
> You really meant eval() is the slowest and has the most overhead right?
>
> thx!
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/calling-function-in-When-which-one-is-faster-tp4028076p4028111.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list