1. Jeff Terrace
  2. pypy


Armin Rigo  committed b2c92d4

Added a FAQ entry.

  • Participants
  • Parent commits b56d8ea
  • Branches default

Comments (0)

Files changed (1)

File pypy/doc/faq.rst

View file
  • Ignore whitespace
 You might be interested in our `benchmarking site`_ and our 
 `jit documentation`_.
+Note that the JIT has a very high warm-up cost, meaning that the
+programs are slow at the beginning.  If you want to compare the timings
+with CPython, even relatively simple programs need to run *at least* one
+second, preferrably at least a few seconds.  Large, complicated programs
+need even more time to warm-up the JIT.
 .. _`benchmarking site`: http://speed.pypy.org
 .. _`jit documentation`: jit/index.html
+Couldn't the JIT dump and reload already-compiled machine code?
+No, we found no way of doing that.  The JIT generates machine code
+containing a large number of constant addresses --- constant at the time
+the machine code is written.  The vast majority is probably not at all
+constants that you find in the executable, with a nice link name.  E.g.
+the addresses of Python classes are used all the time, but Python
+classes don't come statically from the executable; they are created anew
+every time you restart your program.  This makes saving and reloading
+machine code completely impossible without some very advanced way of
+mapping addresses in the old (now-dead) process to addresses in the new
+process, including checking that all the previous assumptions about the
+(now-dead) object are still true about the new object.
 .. _`prolog and javascript`: