Re:Optimizations which made Python 3.6 faster than Python 3....
by Too on Tuesday June 06, 2017 @01:10AM
(#14494887)
Mercurial has another approach. They have something called command server launched once and communicati g over socket if you need to invoke it thousands of times. If start up time is a problem with python your biggest problem is start up time with python, not the difference between 2 and 3.
You should absorb the loop into a single python process that instead calls the original script as a library...