Benchmarking Wrench in a game-type scenario #11
glebnovodran
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am evaluating the different approaches to game scripting for my personal project. To this end I developed a small benchmark that compares performance of the several options that seem suitable for my needs - Lua vs Wrench vs QuickJS.
The benchmark repository is here: https://github.com/glebnovodran/roam_bench/
My personal project is a game-type application and I use scripting to control autonomous characters in it. The benchmark places a certain number of animated characters into the scene. Their state change (e.g. STAND->WALK->TURN transitions) is controlled by the scripts written in the languages mentioned above. Beside the state control code, a simple computational routine is executed each frame for each character.
The idea is to go a little bit further than synthetic tests' absolute performance comparison - I'd like to study the influence that those variants have on the application performance in general, when they are employed for such needs.
Based on my observations, when used in the context of the benchmark, the languages could be ranged by performance as following:
1. Lua
2. Wrench
3. QJS
Although the exact values differ, the performance ratio stays more or less the same on the platforms I tested it at - Linux and Windows-based PCs, ARM and RISC-V devices.
I can see other possibilities how Wrench could be useful in my projects besides character state control - I am considering a VFX/Particle control benchmark.
If you would like to try the benchmark online, you can find the link at the end of the benchmark's README.md. However, when evaluating the results displayed by the online version, one need to consider that the timer precision in browsers is limited or randomized, so the measurements under browsers are of limited use.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions