avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 12, 2018, 12:17 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Shed Skin, an experimental Python-to-C++ compiler  (Read 2358 times)


  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 39,017
    • View Profile
    • Mouser's Software Zone on
    • Read more about this member.
    • Donate to Member
Shed Skin, an experimental Python-to-C++ compiler
« on: August 13, 2006, 05:13 AM »
Still in early alpha stage and quite limited, but cool nonetheless..

Shed Skin is an experimental Python-to-C++ compiler. It accepts pure Python programs, and generates optimized C++ code. This means that, in combination with a C++ compiler, it allows for translation of Python programs into highly efficient machine language. 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 (see Section 5 of my Master's Thesis on the right). Shed Skin also outputs annotated source code.
The high performance and elegant approach of Shed Skin (it is only 6000 lines!) come at a cost. First, it currently only accepts programs that are statically typed. This simply means that variables can only ever have a single type. So e.g. a = 1; a = '1' is not allowed. Of course, a single type can be abstract or generic (as in C++), so that e.g. a = A(); a = B(), where A and B have a common base class, is allowed.