3 ms·
Shed Skin – A (restricted) Python-to-C++ Compiler
- dang 3y agoRelated. Others? Shed Skin restricted-Python-to-C++-compiler 0.9.6 - https://news.ycombinator.com/item?id=34187463 https://news.ycombinator.com/item?id=34187463 - Dec 2022 (4 comments) Shed Skin 0.3 - An Optimizing Python-to-C++ Compiler - https://news.ycombinator.com/item?id=1084282 https://news.ycombinator.com/item?id=1084282 - Jan 2010 (1 comment) Shed Skin - An Optimizing Python-to-C++ Compiler - https://news.ycombinator.com/item?id=1050514 https://news.ycombinator.com/item?id=1050514 - Jan 2010 (5 comments) Shed Skin: An experimental (restricted) Python-to-C++ compiler - https://news.ycombinator.com/item?id=867014 https://news.ycombinator.com/item?id=867014 - Oct 2009 (3 comments) An Optimizing Python-to-C++ Compiler - https://news.ycombinator.com/item?id=331404 https://news.ycombinator.com/item?id=331404 - Oct 2008 (2 comments)
- grandma_tea 3y agoAt first glance, I was confused about why I've never paid attention to this before. This sounds awesome. Then I saw that they only just pivoted Python3. Nice. :)
- emmelaich 3y agoI thought this was the ancient announcement but it is from Dec 27 2023. It's about Python3 support for this Python-to-C++ compiler. Not clear at a glance whether it's Python3 changes in the code or supporting Python3 to C++. I guess both.
- nantes 3y ago> This does not mean that every Python3 feature is supported, but what was there now at least works fine with Python3.. For example, unicode is still restricted to 1-byte characters, and there is no support (yet) for nice new features such as f-strings. Python2 support has been dropped with the new release, and subsequent releases should add support for various new Python3 features.
- emmelaich 3y agoSorta relatedly the Python to Golang system "Grumpy" seems to be moribund. I guess there's no real demand for it. Though I'm curious if there's been unpublished improvments. https://github.com/google/grumpy https://github.com/google/grumpy
- MathMonkeyMan 3y agoI used Shed Skin in the long long ago to speed up a solver for a queuing problem I was playing with. The journey was: - naive python solver: https://github.com/dgoffredo/wait-time/blob/master/solver.py https://github.com/dgoffredo/wait-time/blob/master/solver.py - "optimized" solver that ended up being slower due to more time spent in the python interpreter: https://github.com/dgoffredo/wait-time/blob/master/solver_optimized.py https://github.com/dgoffredo/wait-time/blob/master/solver_op... - used Shed Skin to speed up the python bits, but I don't recall whether I got it to integrate with the fsolve module (I doubt it in retrospect) - rewrote it all in C++ templates using some professor's linpack port; MUCH faster: https://github.com/dgoffredo/hybrd/blob/d84013352797e61d449bc79ca1c28eae3e369638/minpack%2B%2B.cpp#L3127-L3131 https://github.com/dgoffredo/hybrd/blob/d84013352797e61d449b...
- bouchard 3y agoFrom GitHub: > Some timings for the Shed Skin 'sieve' example (n=100000000) and several Python implementations/optimizers: cpython 3.10.6: 13.4 seconds cpython 3.11.0: 11.4 nuitka 0.6.16: 11.4 pypy 3.9.12: 5.8 numba 0.56.4: 2.5 shedskin (master): 1.9 > Note that Numba defaults to int64 as integer type, while Shed Skin defaults to int32. Performance is practically equal when using shedskin --long.
- stuaxo 3y agoGood stuff, I'm glad this project remains alive.