第2页
Why Python is slow
python compared with other languages
zhen wang
第3页
1. Is Python really slow ?
● Demo : slow ● Demo : not slow
○ https://oj.leetcode.com/discuss/10063/hash-ideaand-exception-case
第4页
2. Why Python is slow?
- a comparison with other language runtime - primitive & object model - call stack & memory layout - memory management & gc - package management
第5页
primitive & object model
- primitive overhead comparison - object overhead comparison
第6页
call stack & memory layout
- call stack layout - program memory layout - optimization ( JIT/INLINE ) - GIL
第7页
memory management
- python garbage collector - compare with other runtime
第8页
package management
- java package management - c package management - python package management
第9页
3. Driving forces improving python
- challenge - pypy / Jython / Cython / IronPython - pyston / stackless
第10页
4. How to deal with Performance
- right tool for right task - don’t just say it, measure it. - add assumptions.
第11页
Demo
第12页
Thank you
- marin software is hiring! -> awang@marinsoftware.com
- related material -> http://zinking.github.io/
- hats off to the citations included from internet