| Siyao's profile火星猫PhotosBlogLists | Help |
|
May 25 Google Soc project accepted!两周前,一个荷兰的网友Mark邀请我参加Google Summer of Code 2006,这是从2005年开始,每年Google 公司为了促进开源事业进行的一项活动,以每个学生$4500的资金资助一些学生在夏季完成和开源有关的一个项目,今年入选的学生有600多名,涉及上百个开源社区。
我的项目属于Python Software Foundation,内容是从内存管理的角度提升一个从Python语言到C++语言的编译器的性能(Shed Skin project)。
申请项目时的Proposal如下:
Name: Zheng Siyao
Email: zhengsyao at gmail.com IM: gtalk: zhengsyao at gmail.com Abstract:
I will extend the Shed Skin compiler, so that memory management of
generated code and hence performance is improved. About Shed Skin: Shed Skin is an experimental Python-to-C++ compiler. It accepts pure,
but implicitly statically typed Python programs, and converts them into optimized equivalent C++ programs. The ultimate goal is to be able to run pure Python programs at the speed of manually written C++, so we can combine the elegance and productivity of Python with the efficiency of C++. For a set of 16 non-trivial test programs, measurements show a typical speedup of 2-40 over Psyco, about 12 on average, and 2-220 over CPython, about 45 on average [1]. Proposal: Shed Skin still misses an important type of optimization. Because the
author has mostly focused on type inference techniques, he has not paid much attention to memory management. However, Python memory management is rather inefficient: every object is allocated on the heap, causing costly (de)allocation and garbage collection overheads. Shed Skin currently does nothing to avoid such heap allocation. To improve the performance of generated C++ code, I will investigate and implement techniques to transform as much heap allocation as possible into stack- and static preallocation. This way, we can bring the performance of generated code even closer to manually written C++ code. Feasibility: It has been shown in the literature (mostly within the context of
Java) that stack- and static preallocation can significantly improve performance. The author of Shed Skin has also shown that a very simple technique to perform stack allocation improves performance by 15% on average, up to 30%, for 6 out of 16 non-trivial benchmarks. Deliverables: 1. Implement a technique to transform heap into stack allocation
2. Implement a technique to transform heap into static preallocation 3. Both techniques should work for all the benchmarks in Dufour's thesis, with performance at least matching his prototype techniques, and superior performance for more extreme demonstration programs Timeline: I'm going to work on the project for at least 12 weeks. Detailed arrangement as follows:
1. 2 weeks to get familiar with necessary theory and Shed Skin and some literature; 2. 4 weeks to implement a stack allocation technique; 3. 4 weeks to implement a static preallocation technique; 4. 2 weeks to fix any remaining problems, and to measure performance for the benchmarks in Dufour's thesis and some more extreme demonstration programs. About me: I am a Chinese undergraduate student majoring in Computer Science. I love my major and have a solid foundation in computer architecture,
programming languages, compiler principles, operating systems and so forth. I was elected to the direct PhD program of another university and will skip a Master's degree to start a PhD course in a few months. I am currently doing my undergraduate project with the topic 'Python Implemented in C++'. I have established a subset of Python with the most important features, and developed a virtual machine based on the subset, as well as a compiler that translates Python source code to bytecode. I have used C++ to implement both. During the project, I have learned a lot about Python internals including its object model, its bytecode, and its running mechanism. I like Python very much because of its compactness and elegance.
Python enables me to write beautiful code and be very productive. Although the authors of Python have put much effort into improving the performance of the Python virtual machine, as an interpreted language it is unavoidably slower than compiled languages. With the success of projects such as Shed Skin, we can fulfill our dream of having elegant code run with very high performance. 经过了两周的漫长等待,google终于在它承诺的时间,太平洋白昼时2006年5月23日的24:03分(实际上到了24号了:) ),发出了announcement。
如果你有时间,如果你有激情,如果你热爱开源,那么请关注Google Soc吧!
Comments (7)
TrackbacksThe trackback URL for this entry is: http://zsycat.spaces.live.com/blog/cns!44293220A213592D!441.trak Weblogs that reference this entry
|
|
|