No speed gains from Cython

后端 未结 7 774
不思量自难忘°
不思量自难忘° 2021-01-30 14:05

I am trying to define a function that contains an inner loop for simulating an integral.

The problem is speed. Evaluating the function once can take up to 30 seconds on

7条回答
  •  梦毁少年i
    2021-01-30 14:39

    Will a profiler help you figure out which part is slow? I like to run programs using the standard library profiler:

    python -O -m cProfile -o profile.out MYAPP.py
    

    and then view the output from that in the 'RunSnakeRun' GUI:

    runsnake profile.out
    

    A RunSnakeRun can be installed from here: http://www.vrplumber.com/programming/runsnakerun/

    RunSnakeRun screenshot

提交回复
热议问题