First release of Shed Skin, a Python-to-C++ compiler.

Mark Dufour mark.dufour at gmail.com
Tue Sep 13 05:29:10 EDT 2005


>> Hehe. Okay. It will probably always be the case that you have to lose
>> some Python features if you want the code to run really fast. I
>> suppose PyPy's restricted Python subset doesn't support duck typing
>> either. Luckily not all code is performance critical, or you could
>> just try and optimize some performance critical part. But anyway, I'm
>> starting to understand that Shed Skin should probably support
>> exceptions wherever possible :-)

>Ok - the point I was trying to make was that exceptions were pretty
>integral to Python. I accept that losing the more dynamic features of
>Python for 'compilation' is a possibly worthwhile tradeoff.

Shed Skin's main use will be in algorithmic-like code, which is also
in most need of optimization. Typically such code is not very dynamic,
or uses many exceptions, if any. It may be the case that most programs
written in Python are not algorithmic-like at this point, which would
be logical, since Python is traditionally not one of the fastest
languages.. In that case applying Shed Skin to existing programs may
not be very useful in most cases.

But in any case, exceptions are not really dynamic (I think..) so,
yeah, they should be supported..

>How easy is it going to be to call your c++ code from Python (and vice
>versa) ?

I haven't really thought deeply about this, but I guess it shouldn't
be too hard to use existing C++/Python bridges there. However, I have
no experience at all in this area.. (hint hint)


thanks!
mark.



More information about the Python-list mailing list