I'm using a MVEL
script (string expression) in my java application and trying to decide between running the script with MVEL. eval(script, container)
or with MVEL.executeExpression(compiledScript, container)
.
To be honest, I don't understand the difference between the 2 (they both compile and run fine). I'm using a unit test to investigate the execution time of the 2 options and from what I've noticed so far, the MVEL.executeExpression
works faster than the MVEL.eval
.
What are the core difference between the two?