I’m looking to generate classes once and immediately use them many times for executing custom scripts. These are the options that I found:
- https://asm.ow2.io/
- http://bytebuddy.net
- GitHub - square/javapoet: A Java API for generating .java source files.
- GitHub - square/kotlinpoet: A Kotlin API for generating .kt source files.
Does anyone have any feedback on these options or any other options that I’m not aware of? I would appreciate any suggestions regarding an ideal approach.
Use-Case:
I’m creating a Kotlin back-end application which allows the user to type custom scripts for automation and custom computation. I defined my own beginner-friendly scripting language which also exposes an API for interacting with the application.
My parser creates an object representation of a script and then calls an execute method to run it. I’m running into performance issues with these scripts as they’re run millions of times.