pycom icon indicating copy to clipboard operation
pycom copied to clipboard

Nuance README claims

Open ksamuel opened this issue 3 years ago • 9 comments

The readme states:

generating native code that can run as a standalone executable from Python code has never really been done

But the nuitka (https://nuitka.net/) project has been doing exactly that, for C, for a long time.

Nuitka is stable, support all Python stdlib, syntax and most 3rd party projects, including compiled extensions like numpy. It transpiles to C then compile to several targets, one of them being a native standalone executable.

Speed gain can go up to X4 python perf.

Pycom of course, gets 20-30x, but because it doesn't support the most dynamic python features which are what makes python slow: site imports, zip imports, heterogeneous types, monkey patching for built-ins, dundder methods, etc. As pycom progresses, you'll note the gain to go down significantly.

This is an awesome project, but it would gain from having a more nuanced README.

ksamuel avatar Aug 02 '22 10:08 ksamuel

Tried explaining some of these to the author back when he released it but I guess some things are just better experienced than heard/read.

AnonymouX47 avatar Aug 02 '22 18:08 AnonymouX47

Unfortunately, right now authors cannot properly manage open-source project

Incompetence is blinding, I guess ;0

0dminnimda avatar Aug 02 '22 18:08 0dminnimda

I'm not sure being rude to the author is going to help.

ksamuel avatar Aug 02 '22 20:08 ksamuel

This will definitely not help and isn't productive Although I know one thing, we cannot decide or act for the author

0dminnimda avatar Aug 02 '22 20:08 0dminnimda

I'm not sure being rude to the author is going to help.

Telling hard facts can sometimes seem like being rude.

Personally, I have no problem with the author or project, in fact I see quite some potential here but at the same time, it's important to be realistic about the things @ksamuel has mentioned.

AnonymouX47 avatar Aug 02 '22 21:08 AnonymouX47

There is also https://github.com/pypperoni/pypperoni.

tyteen4a03 avatar Aug 04 '22 19:08 tyteen4a03

There are a lot of python compilers. It doesn't mean someone should not try to make another one. But claims about the possibilities of this only a nascent project are misleading.

0dminnimda avatar Aug 04 '22 19:08 0dminnimda

@ksamuel: FWIW I couldn't get Nuitka to compile a simple print("Hello world") to less than 200KB, which executes about 20x slower than the 65KB executable produced by Pycom. I don't know if Pycom can maintain that speed advantage as it implements more python features, but right now the ability to produce a small fast executable seems to be a big advantage of Pycom over Nuitka.

phodge avatar Aug 08 '22 06:08 phodge

@phodge Cython (industry standard as it's 20+yo and used in a lot of popular packages) produces executables that are faster from 2 to 1000 times vs just running Cpython a.k.a. Python It supports everything you need in python and beyond This should be interested to you

0dminnimda avatar Aug 08 '22 09:08 0dminnimda

@phodge py2many takes the same approach as pycom and has been around for 7+ years under different names. Giving up python C API has a number of benefits like you observe.

adsharma avatar Oct 05 '22 22:10 adsharma