gpt4 book ai didi

python 编译器

转载 作者:太空狗 更新时间:2023-10-29 17:12:04 29 4
gpt4 key购买 nike

我有一些关于 python 的问题

  1. 为什么没有 python 编译器来创建本地代码?我找到了 py2exe 等,但它们只是随附了一个 python 解释器,因此,它又是执行代码的解释器。

  2. 是否无法创建像 LISP 编译器那样的 python 编译器,从而使代码执行得更快(与 C++ 相比)?

谢谢,维奈

最佳答案

Nuitka – Python Compiler

What it is

I thought there ought to be possible to use a compiler for Python, a better compiler than what CPython already has with its bytecode. This is what Nuitka is supposed to be.

It is my attempt to translate pure Python not into bytecode, but into machine code (via C++ compiler), while using libpython at run time. And then to do compile time and also run time analysis to speculatively execute things in a faster mode if certain expectations are met.

关于 python 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8753906/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com