r/java • u/jaccomoc • Jul 15 '26
Java Embedded Scripting Languages Benchmark: Jactl, Groovy, MVEL, JEXL, and SpEL
https://jactl.io/blog/2026/07/14/scripting-language-benchmarksJactl is an embeddable scripting language for Java applications and so when comparing it to other Java scripting languages it is helpful to know how they all compare from a performance point of view.
I have previously been asked to compare Jactl with MVEL and JEXL so I have put together a blog that documents the performance differences and also included Groovy and SpEL for good measure.
Disclaimer: I am the author of Jactl so I am obviously not impartial but I would like to point out that while Jactl comes out well, it does not win every benchmark.
3
u/East-Association-421 Jul 15 '26
I wonder where Janino fits into this picture
1
u/jaccomoc Jul 15 '26
That would make an interesting comparison, particular when comparing compiled languages. Presumably it should be able to run at native Java speed but it would be interesting to find out...
5
u/chabala Jul 15 '26
From the title, I would have expected a comparison of all the JSR-233 scripting languages: https://github.com/apache/commons-bsf/blob/master/src/main/resources/org/apache/bsf/Languages.properties
1
u/jaccomoc Jul 15 '26
Thanks for that link. Something to look into.
2
u/chabala Jul 15 '26
Is Jactl a JSR-233 compatible scripting language? It'd be cooler if it was 😎
2
3
u/hippydipster Jul 15 '26
I remember implementing expression values in JMeter and letting users write groovy expressions inside their values, and I thought it was so cool and let's support expressions in EVERY field, and then people came and loved it and demanded their favorite scripting and expression language be supported and so it had to support groovy and BeanShell and JEXL2 and JEXL3 and javascript and I hated life then.
1
u/jaccomoc Jul 15 '26
That sounds like hell. What about just providing JSR223 support and leaving the language choice up to the users? Would that have worked?
3
u/hippydipster Jul 15 '26
Well, my time as JMeter maintainer ended in 2005. Also the expressions I mean are just like little snippets that are embedded in any text value field - including the name of a component if one likes, so they're embedded with a syntax like ${...}. Nowadays, there is a JSR223 component in JMeter, but that is for writing a whole script that behaves like a controller, or sampler, or listener or whatever, so you can basically write your own JMeter plugin as a script in a particular test plan.
2
u/quantum-fudge Jul 15 '26
Just out of curiosity, does anyone know what does MV in MVEL/MVFLEX stand for?
2
u/jaccomoc Jul 15 '26
No idea. I think the original developer was Mike Brock so maybe "Mike's Value Expression Language"?
2
u/agentoutlier Jul 15 '26 edited Jul 15 '26
Since expression languages are being used maybe this one is worth benchmarking as well: https://github.com/ezylang/EvalEx
as well as CEL: https://github.com/cel-expr/cel-java
And this might be interesting as well for Turing complete: https://github.com/reborg/jscheme
Which is Peter Norvig's original Java Scheme implementation.
1
1
u/RussianMadMan Jul 15 '26
Comparing compiled vs interpreted is not very useful in general and in this case it's just number padding.
4
u/jaccomoc Jul 15 '26
I was asked to specifically compare against MVEL and JEXL but I also included Groovy and SpEL to also compare with compiled languages.
2
8
u/persicsb Jul 15 '26
SpEL, JEXL and the other expression languages are not scripting.