New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-compile scripts? #865
Comments
That would require serializing the AST into some format (perhaps binary). However, based on my previous benchmarks, it doesn't seem to be faster deserializing an AST vs just compiling the script again. In fact, compiling a script into AST appears to be faster than deserializing a pre-generated AST from binary format. If scripts compilation need only be done once, I wonder what would be the problem with your performance issues? |
In fact, you can use Rust with LuaJIT and then retain all your existing scripts. There are Rust bindings for LuaJIT, I believe. Why not go that route? |
Rhai allows me to easily build to tons of platforms, including musl. LuaJIT is kind of prohibitive. :( |
OK... that makes sense. So what aspects of Rhai do you find slower than you wish? |
Haven't got that deep down yet, it was a very native comparison between separate builds doing the same game logic. Once I have useful and actionable information, I'll share it for sure. Thanks for creating rhai! :) |
Well I didn't create Rhai... it was originally created by JT. I merely picked up maintenance of it. |
Would it be possible to pre-compile rhai scripts used in an application and bundle them with the application? The reason I ask is due to the fact that performance is not great (compared to our current implementation with C++ and LuaJIT), but there are clear advantages in our project by moving to Rust/Rhai. If pre-compiling was a possibility, then I'm sure speed would be much better.
The text was updated successfully, but these errors were encountered: