Live data from Hacker News

Nuitka — A Python Compiler

kayhayen24x7.homelinux.org

31–34 of 34 posts

Re: Nuitka — A Python Compiler

#31
post #19

Should also just check out Psyco: http://psyco.sourceforge.net/ "Psyco is a Python extension module which can greatly speed up the execution of any Python code."

Psyco is unmaintained, the developer of it (Armin Rigo) is working on PyPy (a Python compiler written in Python) instead: http://codespeak.net/pypy/dist/pypy/doc/

They are already seeing quite nice results for computation-heavy benchmarks with the (tracing) JIT: http://speed.pypy.org/comparison/

Re: Nuitka — A Python Compiler

#32
post #11
post #10

Earlier quoted context omitted.

Compilation also helps distribution, though. Distributing a single compiled binary for a particular platform is a lot easier than telling people they need to have some particular version of Python and libraries installed.

Though you could just bundle your program up with the interpreter and all the libraries to make this work. No translation to binary necessary.

Yes, you could do that. Whether that's the better strategy is an exercise left to the implementer.

Re: Nuitka — A Python Compiler

#33
post #10

Earlier quoted context omitted.

Compilation also helps distribution, though. Distributing a single compiled binary for a particular platform is a lot easier than telling people they need to have some particular version of Python and libraries installed.

I hear that idea put forth sometimes. When was the last time you downloaded a single compiled binary from someone? I don't think I've ever done that, except maybe for darcs.

Example: the sysinternals tools for windows were originally distributed as single compiled binaries, and this was far and away the best approach for those tools. Also, just because developers used installers on windows doesn't mean some of them weren't making a boneheaded design decision to do it that way and their app would have been more sensibly distributed as a single binary.

A single, statically-linked binary was (and probably still is, though .NET may be better now) the most portable way to distribute a program on windows. You can't expect perl to be there, you can't expect python or ruby to be there. Java was usually there but not trustworthy. Java version conflicts on windows are a nightmare. That's probably improved unless you're a business running legacy apps. Dlls were difficult to manage and library conflicts were common: http://en.wikipedia.org/wiki/DLL_hell.

Yes, you could use an installer, but that was unnecessary overhead if your application was not sufficiently complex. On windows, you want to be able to say "download this, click on it, and when the gui pops up: have fun."

This is not true on Unix. On unix, a simple perl script is likely to be far more portable than a single binary. Python and ruby are reliable as well. C source code is as portable (or more portable in some cases) than any of the above, though installation is more complex. Also, many of the utilities that would be convenient as downloadable binaries come standard with the OS (grep, find, awk, vi). Unix package managers are powerful and useful, and developers can trust that typical unix users understand them well enough to use them.

Re: Nuitka — A Python Compiler

#34
post #19

Should also just check out Psyco: http://psyco.sourceforge.net/ "Psyco is a Python extension module which can greatly speed up the execution of any Python code."

While psyco is great you can't really rely on it anymore since it's 32-bit only. Though simply using it if it's available does help slower, older machines that need the speedup, so I wouldn't write it off completely.

Hopefully Unladen Swallow will make even more progress over the rest of the year.

Post reply on HN