May-09-2018, 05:01 PM
Hello All,
I am a novice Python user. I inherited a large Python program and I'm trying to speed it up. This is a Python 2.7.9 application performing number crunching with streaming data. The numpy package is used for the number crunching. I'm working on a Raspberry Pi running Raspbian 4.9.45-v7+. I want this application to run as fast as possible. I am compiling the application with this command:
sudo nuitka --recurse-not-to=time,sys,os,json,socket,datetime,numpy,multiprocessing,collections,matplotlib.pyplot,urlib2,onvif,posix_ipc RIH.py This produces the executable RIH.exe
I want to make sure that I am compiling correctly to maximize my program's speed.
Questions:
1.)Is RIH.exe 'fully compiled' or are parts of it still interpreted when it runs?
2.)If I use --recurse-to on some of the packages will this make my code run any faster? i.e. will this force compilation of more of my code and avoid some parts of my program being interpreted at run time?
3.)How could I change my compile commands to make my code run as fast as possible?
Thank you in advance for any info on this,
Rob
I am a novice Python user. I inherited a large Python program and I'm trying to speed it up. This is a Python 2.7.9 application performing number crunching with streaming data. The numpy package is used for the number crunching. I'm working on a Raspberry Pi running Raspbian 4.9.45-v7+. I want this application to run as fast as possible. I am compiling the application with this command:
sudo nuitka --recurse-not-to=time,sys,os,json,socket,datetime,numpy,multiprocessing,collections,matplotlib.pyplot,urlib2,onvif,posix_ipc RIH.py This produces the executable RIH.exe
I want to make sure that I am compiling correctly to maximize my program's speed.
Questions:
1.)Is RIH.exe 'fully compiled' or are parts of it still interpreted when it runs?
2.)If I use --recurse-to on some of the packages will this make my code run any faster? i.e. will this force compilation of more of my code and avoid some parts of my program being interpreted at run time?
3.)How could I change my compile commands to make my code run as fast as possible?
Thank you in advance for any info on this,
Rob