为什么Psyco使用大量的内存? [英] Why does Psyco use a lot of memory?

查看:227
本文介绍了为什么Psyco使用大量的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Psyco 是Python的专用编译器。 文档状态

Psyco is a specialising compiler for Python. The documentation states


Psyco可以并将使用大量内存。

Psyco can and will use large amounts of memory.

这个内存使用的主要原因是什么?一般来说,大量内存开销是JIT编译器的一个特性吗?

What are the main reasons for this memory usage? Is substantial memory overhead a feature of JIT compilers in general?

编辑:感谢您的答案。共有三个可能的竞争者。

Thanks for the answers so far. There are three likely contenders.


  • 编写多个专用块,每个都需要内存


>问题是,哪一个是内存使用的主导因素?我有我自己的意见。但我要添加一个赏金,因为我想接受的答案,实际上是正确的!如果任何人可以证明或证明大部分内存的使用,我会接受它。

The question is, which one is the dominant factor in memory usage? I have my own opinion. But I'm adding a bounty, because I'd like to accept the answer that's actually correct! If anyone can demonstrate or prove where the majority of the memory is used, I'll accept it. Otherwise whoever the community votes for will be auto-accepted at the end of the bounty.

推荐答案

从psyco网站与区别JIT编译器的传统方法是Psyco编写相同块的几个版本(块是一个功能的一部分),它们通过专用于某些种类的变量(种类可以意味着一种类型,但更一般)

From psyco website "The difference with the traditional approach to JIT compilers is that Psyco writes several version of the same blocks (a block is a bit of a function), which are optimized by being specialized to some kinds of variables (a "kind" can mean a type, but it is more general)"

这篇关于为什么Psyco使用大量的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆