Live data from Hacker News

Nuitka: An extremely compatible Python compiler

nuitka.net

21–30 of 88 posts

Re: Nuitka: An extremely compatible Python compiler

#21
post #9

Tangentially related question: could Nuitka target WebAssembly, given that according to their overview page, they translate Python into C? Usually when it comes to Python -> WebAssembly, the biggest problem is the lack of GC in the WebAssembly spec (as far as I understand), and I'm wondering if this would be an issue for Nuitka as well...

Yes but pyodide is probably better suited for that and can load uncompiled python code.

See :

https://github.com/pyodide/pyodide

And an example featuring a pure client side jupyter instance :

https://news.ycombinator.com/item?id=28377550

Re: Nuitka: An extremely compatible Python compiler

#23
post #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

> In case of microcontrollers, PXT programs are compiled in the browser to ARM Thumb assembly, and then to machine code, resulting in a file which is then deployed to the microcontroller, usually via USB mass-storage interface.

Looks like the only compilation strategy is directly to ARM Thumb assembly or did I miss something?

Re: Nuitka: An extremely compatible Python compiler

#24

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?

> 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).

Mind sharing that code? I'm sure someone would like to be able to look into this.

Re: Nuitka: An extremely compatible Python compiler

#25
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.

The best feature of nuitka, and its main goal, is not speed gain. That's the cherry on top.

The main goal is getting a standalone executable that works with c extensions.

Re: Nuitka: An extremely compatible Python compiler

#27
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/

[deleted]

Re: Nuitka: An extremely compatible Python compiler

#29
post #18

Earlier quoted context omitted.

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.

"Can compile Javascript sources to executables with no external dependency"
Post reply on HN