Live data from Hacker News

Nuitka: An extremely compatible Python compiler

nuitka.net

11–20 of 88 posts

Re: Nuitka: An extremely compatible Python compiler

#11
This project is super impressive. It makes me wonder why there's not a similarly mature JavaScript AOT compiler implementation for use in game development or other places where you want performance better than a VM and you're not allowed to JIT.

A small recommendation for these release pages would be to link to the tag in whatever source host you're using! I just want to see the code.

Re: Nuitka: An extremely compatible Python compiler

#12
If you used pip install nutika -U - on both mac and linux, it doesn't find an installation candidate for me. pip install -U "https://github.com/Nuitka/Nuitka/archive/develop.zip" works on both currently. But this does not get "nutika" on the path. Perhaps someone here is more familiar with the installation system and can comment?

Re: Nuitka: An extremely compatible Python compiler

#13

If you used pip install nutika -U - on both mac and linux, it doesn't find an installation candidate for me. pip install -U " https://github.com/Nuitka/Nuitka/archive/develop.zip " works on both currently. But this does not get "nutika" on the path. Perhaps someone here is more familiar with the installation system and can comment?

nutika ≠ nuitka

Re: Nuitka: An extremely compatible Python compiler

#14

If you used pip install nutika -U - on both mac and linux, it doesn't find an installation candidate for me. pip install -U " https://github.com/Nuitka/Nuitka/archive/develop.zip " works on both currently. But this does not get "nutika" on the path. Perhaps someone here is more familiar with the installation system and can comment?

It's nuitka, not nutika.

And use "python -m nuitka", not "nuitka" alone.

"-m" is a very important option in python that solves a lot of path problems.

Re: Nuitka: An extremely compatible Python compiler

#15
post #5

Nuitka looks like a traditional ahead-of-time compiler using SSA form[0] and is written in Python. I’d be interested in seeing performance comparisons with PyPy, which uses the second Futamura protection and is written in a dialect of Python. [0]: https://nuitka.net/doc/developer-manual.html#ssa-form-for-nu...

It's slower than pypy, but starts faster and results in a standalone executable. Also, it's compatible with most c extensions.

Re: Nuitka: An extremely compatible Python compiler

#16

How is this more compatible than just python? Since it requires libpython so you anyway need to have python installed on the target machine? Also is this actually faster than just python? I tried it out with some bad expensive looping using lists with python3.9 and it was 100ms slower (1.3sec vs 1.4sec). Just in general why should I be using Nuitka?

nuitka takes your python code and all its deps, turns it to c code, and compiles that into a standalone executable that is both faster and doesn't need a separate python vm to be installed.

Re: Nuitka: An extremely compatible Python compiler

#17
post #8

Wow, this got my attention. I use Python for web application development. A 2-3x speedup would be very interesting for higher-load deployments.

You're extremely unlikely to get much, if any, speed up on a large, general codebase.

The 2-3x improvements are on specific micro benchmarks.

Re: Nuitka: An extremely compatible Python compiler

#18

This project is super impressive. It makes me wonder why there's not a similarly mature JavaScript AOT compiler implementation for use in game development or other places where you want performance better than a VM and you're not allowed to JIT. A small recommendation for these release pages would be to link to the tag in whatever source host you're using! I just want to see the code.

There is, for example https://bellard.org/quickjs/

Re: Nuitka: An extremely compatible Python compiler

#19

This project is super impressive. It makes me wonder why there's not a similarly mature JavaScript AOT compiler implementation for use in game development or other places where you want performance better than a VM and you're not allowed to JIT. A small recommendation for these release pages would be to link to the tag in whatever source host you're using! I just want to see the code.

Not really what you are after, but it does use AOT (via generated C++ code).

https://arcade.makecode.com/

https://makecode.com/language

Re: Nuitka: An extremely compatible Python compiler

#20
post #18

This project is super impressive. It makes me wonder why there's not a similarly mature JavaScript AOT compiler implementation for use in game development or other places where you want performance better than a VM and you're not allowed to JIT. A small recommendation for these release pages would be to link to the tag in whatever source host you're using! I just want to see the code.

There is, for example https://bellard.org/quickjs/

That's an interpreter written in C and without a JIT. Not the same as an AOT compiler.

https://github.com/bellard/quickjs/blob/master/quickjs-opcod...

The point isn't just not having a JIT. You can run v8 without a JIT. The point is good performance without a JIT.

Post reply on HN