I have C++ app where it does many calculations, but the most of time it needs to execute simple scripts by PyRun_SimpleString()
so I'm curious if is there something in Python/C API, what would do faster following tasks:
- do simple assignents like
x = 0.1
(changing over time)? - execute script storaged in string (maybe something like compile once to run faster)?
For now I do all these tasks by executing PyRun_SimpleString()
. In loop performance loss is significatn.