Re:Optimizations which made Python 3.6 faster than Python 3....
by joshuamorton on Tuesday June 06, 2017 @12:59AM
(#14494847)
It absolutely is. Consider that that means that python takes 2-3 frames to start up. I'm not sure one should or could reasonably consider that "slow" for interactive use.
Re:Optimizations which made Python 3.6 faster than Python 3....
by microcolonel on Tuesday June 06, 2017 @12:28PM
(#14498514)
Mostly open, read, and fstat for python2:
~ strace python2 -c exit 2>&1 | sort | grep "^[a-z_]*[(]" | sed -e "s/^\([a-z_]*\)[(].*/\1/" | uniq -c | sort -rn | head -n 8
199 open
98 read
94 fstat
92 stat
68 rt_sigaction
63 close
27 mmap
16 mprotect
Mostly stat, rt_sigaction, and read for python3: ~ strace python3 -c exit 2>&1 | sort | grep "^[a-z_]*[(]" | sed -e "s/^\([a-z_]*\)[(].*/\1/" | uniq -c | sort -rn | head -n 8
92 stat
68 rt_sigaction
57 read
54 fstat
35 open
35 close
28 mmap
24 lseek
Some of this might be noise though, it's possible that it has something to do with the installed packages, not sure exactly.
Thanks for including the syscall counts. I know they'd been working to reduce that, but I hadn't seen how much progress they'd made yet. Are most of those to malloc() and open()?