Siyao's profile火星猫PhotosBlogLists Tools Help

Blog


    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)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    登科wrote:
    4500刀  在国外 2个月 工作  没什么
     
    在国内不一样啊 4万4啊 月收入2万了
    Aug. 31
    Lei FENGwrote:
    不好意思没有打完就发布了,
    我的msn:cruisefeng@yahoo.com.cn
    有空咱们聊聊!
    June 9
    Lei FENGwrote:
    太多好东东了,有一种相见恨晚的感觉.
    我的qq:286258396
    June 9
    Picture of Anonymous
    spbird wrote:
    真是不错
    诚挚的祝贺
     
    June 5
    Siyao Zhengwrote:
    要辛苦劳作一个夏天才有钱呢...
    May 31
    Lucifer Xwrote:
    发钱没有  嘿嘿  我比较关心这个
    May 31
    wenwrote:
    恭喜恭喜,4500美元啊,好大一笔钱哦。
    May 25

    Trackbacks

    The trackback URL for this entry is:
    http://zsycat.spaces.live.com/blog/cns!44293220A213592D!441.trak
    Weblogs that reference this entry
    • None