Projects / Shed Skin

Shed Skin

Shed Skin is an experimental (restricted-)Python-to-C++ compiler. It accepts pure but implicitly statically typed Python programs and generates optimized C++ code. The result can be further compiled to stand-alone programs or extension modules. For a set of 63 non-trivial test programs, at more than 16,000 lines in total (sloccount), measurements show a typical speedup of 2-200 times over CPython. Not all Python features are supported, and only a subset of about 25 library modules, such as re and random.

Tags
Licenses
Operating Systems
Implementation

Recent releases

  •  16 Jan 2012 10:34

    Release Notes: Several bugs were fixed. itertools.product was greatly optimized. str.join and str.__ne__ were optimized. A new 'image scaling' example was added (hq2x). The optional enumerate 'start' argument is now supported. Extension module warnings were improved. A new option -L was added, to add a library directory. FLAGS can now reside in /etc/shedskin, and lib/ in /usr/share/shedskin.

    •  10 Sep 2011 11:06

      Release Notes: Scalability was again greatly improved. Performance of file I/O and complex numbers was greatly improved. Three new modules are supported. Six new example programs were added. There were many other bugfixes and improvements.

      •  21 Jun 2011 14:15

        Release Notes: Support was added for the "struct" and "array" modules. Three new examples were added, for a total of 57. The C64 example was updated, and is now more than 3,000 lines (sloccount). An option was added to display exception tracebacks (shedskin -x). Many bugs were fixed.

        •  26 Mar 2011 12:27

          Release Notes: Extension module support was improved. Several builtins were optimized: zip, min, max, map, filter, reduce, and pow. A warning was added for non-uniform tuples of length greater than 2. Internals for looping and sequences were cleaned up. Two new examples were added: a quantum monte carlo simulator and an rsync implementation.

          •  20 Dec 2010 16:39

            Release Notes: A new Windows package was added. The warning system was fixed again (this time with tests). There were many minor bugfixes and some optimizations. Two new examples were added.

            Recent comments

            07 Jan 2007 08:29 srepmub

            Re: Comment on announcement language
            hello skip,

            you're right - 'implicitly statically typed' is perhaps a bit terse. I am planning on creating a new homepage and summary-description that are more clear about this. I should probably also mention that, in the future, shed skin will be more useful to create extension modules than to compile arbitrary python programs. the wikipedia page is more clear I think, but still not very optimal.

            thanks for the comment ^^
            mark.

            05 Jan 2007 07:28 montanaro

            Comment on announcement language
            I think it's important that you are very clear in your announcements that ShedSkin translates a subset of Python to C++. It's there if you read between the lines, but the performance comparison between ShedSkin and Psyco or CPython implies that ShedSkin accepts the same language they do when in fact it doesn't.

            Screenshot

            Project Spotlight

            OpenStack4j

            A Fluent OpenStack client API for Java.

            Screenshot

            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.