|
Hello,
I would like to use LUA scripts for a simulation. The simulation should be iterative with time dependency, so the LUA script is called on the time step t and calculates the values for the step t+1. I think
one LUA function with signature is my target:
new_state = run( current_state, environment )
I will set up new_state, current_state and environment as tuple structures or dictionary. My problem is at the moment the LUA calls, because I have some LUA scripts with the run function and each LUA
script descripes an individual (independed) dataset. So I create around 10^6 - 10^12 states and the LUA script must run for all this states / tuples on each time step. I would like to do this in parallel (thread).
So I think 10^12 LUA parser etc is not recommand, so I would read the LUA script first, parse it (with syntax checking) and create the stack call (lua_call).
Is there any chance to optimize the LUA calls, because I think in large datasets caching can be very efficient and I don't want create a lot of work load for LUA.
I hope that you can send me some ideas
Thanks a lot
Phil