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.
As you suspect, there's indeed two parts to running Python code: interpretation and execution. See Py_CompileString and PyEval_EvalCode. But for simple statements like x=0.1, you might even consider modifying locals yourself via PyLong_FromDouble(0.1)
Is PyRun_SimpleString() function slow?