Jactl vs Groovy, JEXL, MVEL, and SpEL: A Performance Comparison
· 27 min read
This post presents the results of some representative benchmarks using the JMH benchmarking library to run comparative tests across the following five different Java-based scripting/expression languages:
| Language | Version | Notes |
|---|---|---|
| Jactl | 2.9.0 | Compiles to JVM bytecode |
| Groovy | 5.0.6 | Compiles to JVM bytecode |
| Apache Commons JEXL | 3.6.2 | AST interpreter |
| MVEL | 2.5.2 | AST interpreter with limited bytecode generation |
| Spring Expression Language (SpEL) | 5.3.39 | Hybrid expression tree/bytecode interpreter |
Benchmarks were run on a Java 25.0.2 JVM
The benchmarks focus mostly on short, expression based tests, in an attempt to mirror the types of scenarios where scripting languages are often used (for example in rules processing systems). There is one longer benchmark with a script of around 30 lines, as well as benchmarks comparing the compilation speeds.
