아 이것도 재밌었다. 그나저나 포스트들이 기니까 숨김처리를 좀 해야겠다.
- Merger PEP approved!!
- wpython
- Why optimize Python?
- Top 3 langs: C++, Java, Python
- All youtube is pure Python
- Goals: 5x faster with all the goodies -- source compatibility, c modules compatibility, easy migration
- Google uses a heavy dose of SWIG
- Jython might potentially be an option; but the teams are.... running low on time
- Why is slow?
- everything is an object, everything is a method call, and we have ducktyping
- len() needs 5 memory references
- redefining globals while a generatior is on???
- Unladen Swallow; compile to machine code. assumptions:
- globals/builtins not overridden once set
- classes never change
- objects never change type
- locals aren't deleted
- exec is never used
- the point while most things are doable and plausible in testing and stuff, but it should stay there and never come to production!
- Structure
- when a part of code is detected to be hot; it is shoved into LLVM
- Why LLVM?
- It ships with a C-front end
- CPython is written in C; we can inline between CPython and Python code (wow)
- LLVM can hugely improve over naive inlines by various optimization techniques
- Benchmark suite; richard, pybench, ...
- 32 of becnhmarks, used by PyPy as well, soon by Jython
- Correctness; SWIGed code, Django, NumPy, Twisted, etc (NumPy yay!!!)
- Performances
- 1% to 84% improvement over CPython
- Against Jython; 3 - 4x faster
- Against PyPy: can be 5% slower, 30x faster?!?!
- Memory Usage is 15% ~ 400% higher
- What they screwed up
- change eval loop to V-engine? (2009-Q1)
- why aren't 5x goals met?
- we thought LLVM was awesome and bug-free; it wasn't true.
- limit of 16MB machine code generated
- they had to add gdb integeration to LLVM
- had to fix profiler
- but we can do better; self did it, V8 did it, we have a lot of list of optimization
- GIL?
- Recycler; IBM paper => wow it will cure world hungry, and cancer... => somebody mailed us "we tried that, didn't work."
- Merger
- Guido approved the PEP -- will merge into Python 3.3
- they have sprints
- Q&A
- Google will eventually use Python 3
- And optimizing is about eliminating cheap, but non-free things we do over and over again
- Memory usage => didn't work on, binary size => we're linking static, but will be linking shared soon


