为什么 Perl 不像 python 那样编译成二进制文件
在我看来,Python 解释器将创建字节码 .pyc 文件是一件好事(即就编译时间而言)。我相信 python 使用某种哈希来确定源是否已更改,然后重新编译。
这对于 Perl 来说是个好主意吗? (相对于具有许多依赖项等的较大项目)。
It strikes me as a Good Thing (ie. in terms of compilation time), that the Python interpreter will create bytecode .pyc files. I believe python uses some sort of hash to determine if the source has changed and then recompile.
Would this be a good idea for Perl? ( with respect to the larger projects with many dependencies etc ).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对于
.pmc
文件的相当长的解释,有关于 perlmonks 的长文,还解释了为什么没有人使用它。For quite long explanation of
.pmc
files, there is lenghty article on perlmonks, also explaning why nobody uses it.实际上,有一种方法可以将 Perl 编译为字节码,但它有一些限制。请参阅 B::Bytecode。
Actually, there is a way to compile Perl to bytecode, but it has some limitations. See B::Bytecode.
Parrot 是一个字节码 VM,应该被下一个版本的 Perl 使用,即 Perl6,但显然不再有(感谢 巴尼·施梅尔的评论)
Parrot is a bytecode VM which should have been used by next version of Perl, i.e. Perl6, but apparently no more (thanks to Barney Schmale's comment)
Perl 从二进制文件加载的时间比从源文件加载的时间要长。
It took longer for Perl to load from binary than from source.