JfireEL is a fast EL expression parser, which supports rich EL expressions and has 7 times the ultra-high performance of SpringEL.
Use Scenarios
EL expression parsing is often used in some situations involving dynamic rule configuration. For example, external rule injection in the workflow engine, such as SpEL parsing in the Spring framework, etc. The jfireEL framework supports common EL expressions, such as four operations, array element acquisition, linked list element acquisition, Map key value pair acquisition, attribute acquisition, method invocation, cascading invocation, class definition acquisition, enumeration definition acquisition, object acquisition, etc.
Compared with SpringEL, jfireEL is more concise in expression. For example, for SpringEL, an expression of variable attribute cascade comparison can be written as vars['home'].bool(vars['person'].getAge() + '12' != vars['value'])
, while jfireEL is written as home.bool(person.getAge() + '12' != value)
。 Obviously, jfireEL is more readable.
performance testing
Use EL expressions vars['home'].bool(vars['person'].getAge() + '12' != vars['value'])
Performances of jfireEL, BeetlEL and SpringEL frameworks are compared and verified. Warm up for the same number of times before entering the test to ensure the initialization is completed. The performance comparison of the three frames is as follows: