[pypy-dev] new -O option

Armin Rigo arigo at tunes.org
Sun Aug 3 15:13:49 CEST 2008

Hi all,

I'm going to merge the "opt-option" branch; I'll write a blog post entry
when it's done.  It removes the "--faassen" and "--allopts" options to
translate.py and adds instead the "--opt=#" option, which can also be
spelled "-O#", where "#" is one of 0, 1, size, mem, 2 or 3.  Levels from
0 to 3 are trade-offs between the time+memory it takes to translate, and
the efficiency of the produced executable.  Levels "size" and "mem" try
(or should try in the future) to minimize the executable size and the
runtime memory usage, respectively.  The level is a global option of
translate.py but it also influences PyPy-specific options in
targetpypystandalone.py; for example, a bit arbitrarily, geninterp is
disabled with -O0.  The specific config options enabled or disabled by
each level can depend on e.g. the selected backend; see the two
functions set_opt_level() and set_pypy_opt_level().

We have a number of open branches; does it make sense, in an effort to
reduce confusion, to apply this change to some of them too?

A bientot,


More information about the Pypy-dev mailing list