<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi, Laun,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I might be dull but what does this indicate? Drools did OPTIMIZE
MVEL dialect? But call it twice means optimization?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Best<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Abe<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:SimSun'>发件人<span
lang=EN-US>:</span></span></b><span lang=EN-US style='font-size:10.0pt;
font-family:SimSun'> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] </span><b><span style='font-size:
10.0pt;font-family:SimSun'>代表 </span></b><span lang=EN-US
style='font-size:10.0pt;font-family:SimSun'>Wolfgang Laun<br>
</span><b><span style='font-size:10.0pt;font-family:SimSun'>发送时间<span
lang=EN-US>:</span></span></b><span lang=EN-US style='font-size:10.0pt;
font-family:SimSun'> 2012</span><span style='font-size:10.0pt;font-family:SimSun'>年<span
lang=EN-US>1</span>月<span lang=EN-US>5</span>日<span lang=EN-US>
16:53<br>
</span><b>收件人<span lang=EN-US>:</span></b><span
lang=EN-US> Rules Users List<br>
</span><b>主题<span lang=EN-US>:</span></b><span lang=EN-US>
[rules-users] MVEL performance penalty<o:p></o:p></span></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Drools 5.3.0
FINAL.<br>
<br>
This experiment was inspired by code posted with the insinuation that MVEL
would &quot;optimize&quot; condition evaluation. - Consider this rule:<br>
<br>
rule &quot;Term - java&quot;<br>
dialect &quot;java&quot;<br>
when<br>
&nbsp; &nbsp;$ea : EasyApp( Test.valueInList( $ea.getProductCode(), &quot;CAR&quot;
)==true<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; age
&lt; 0 )<br>
then end<br>
<br>
You'd expect that Test.valueInList() is called once per inserted EasyApp fact,
and this can be verified easily. - Now the same rule, with MVEL's syntactic
sugar:<br>
<br>
rule &quot;Term &nbsp;- mvel&quot;<br>
dialect &quot;mvel&quot;<br>
when<br>
&nbsp; &nbsp; $ea : EasyApp( Test.valueInList( productCode, &quot;CAR&quot;
)==true<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp;
age &lt; 0 )<br>
then end<br>
<br>
<b><i>Now Test.valueInList() is called twice for each inserted fact.</i></b><br>
<br>
Cheers<br>
Wolfgang<br>
<br>
<o:p></o:p></span></p>

</div>

</body>

</html>