Why does Psyco use a lot of memory?

Psyco is a specialized compiler for Python. documentation

Psyco can and will use large amounts of memory.

What are the main reasons for using this memory? Is significant memory shortage a feature of JIT compilers in general?

Edit: Thanks for the answers. There are three likely rivals.

  • Writing several specialized blocks, each of which requires memory
  • Overhead due to on-the-fly source compilation
  • Overhead due to capturing enough data for dynamic profiling

The question is which one is the dominant factor in memory usage? I have my own opinion. But I add generosity because I want to accept an answer that is really correct! If anyone can demonstrate or prove where most of the memory is used, I agree with her. Otherwise, the person voted by the community will be automatically accepted at the end of the award.

+5
source share
4 answers

psyco " JIT , Psyco ( - ), (" " , )"

+10

"Psyco , , , ". http://psyco.sourceforge.net/introduction.html

JIT , , . , ; . Psyco, , , , , , , .

< > &; Python, , (, , ), ; , Python.

+5

Psyco . , . Python, Psyco ; , "" , , , Psyco - .

, , , . , . , , , .

+2

psyco . Psyco , . , , psyco .

If you run your program on Linux, you can look at / proc / xxx / smaps to see a growing block of anonymous memory that is in different regions than a bunch. This is an anonymous mmap'ed part for writing assembly language, which, of course, disappears when working without psyco.

+2
source

All Articles