Hi everyone.
I want to add some scripting features to my C++ app (Qt).
What I need is executing small functions (both in C++ and script), sometimes millions of times per second, so I need speed.
I first tried with QtScript, it provides great integration with QObejcts (which I don't really need) but it is very slow.
Then I tried LUA and it is really fast, but there are a few thing I don't like.
Now I found AngelScript and I like it, seems exactly what I need and it is very fast but still slower than LUA.
So I'm not yet decided: I would like to use AngelScript, it is much better suited for my purposes and has everything I need, but speed is really needed.
Note that I'm just evaluating which scripting language to use, so I only know the very basics to make the simplest example.
Doing some profiling I found that the bottleneck is in function calls, specially script calls. Specially: context->Prepare and asPushActiveContext whithin execute() are very expensive.
So I would like to know if it is possible to speed up script function calls, by saving contexts or avoiding some of these steps. Note that some script functions are called over and over again without calls to other script functions.
I'm not asking for the concrete implementation, I just want to know If it is possible and if so what kind of speed up could I get.