Tuesday, August 19, 2008

New translation option: --opt

Hi all,

A few command-line options for translate.py have changed. Most interesting is that optimization levels are selected with the option --opt, or -O for short. This replaces --allopts, which was also called --faassen in reference to a person who is actually not involved in PyPy (so that was a bit of a strange joke). Also, --allworkingmodules is the default nowadays, and can be cancelled with --no-allworkingmodules. Threads are also included in --allworkingmodules now.

Examples:

  • translate.py (reasonable default, corresponds to --opt=2)
  • translate.py --opt=3 (best, maybe 10-20% faster)
  • translate.py --opt=1 (translation is faster and less RAM-hungry)

For more information, see:

2 comments:

  1. maybe for a bit of background: Martijn Faassen regularly asked at our talks "how fast is PyPy now?" - at times when PyPy was going from 2000 to 500 to 50 to ???? times slower than CPython (nowadays at 1-6 times, btw). so with "--faassen" we were trying to translate an "as-fast-as-possible" pypy. so now we are getting dead serious (also Martijn actually asked for removing his name from the commandline) and introduced a we-are-becoming-a-real-compiler-with-opt-levels "-O" option :)

    Martijn, to be clear: i really appreciate having you and your questions in our talks and in general - it also pushed me to get out py.test releases ... :) holger

    ReplyDelete
  2. Congrats to PyPy on having a more sensible option! (though an option called 'opt' made me think it stood for 'option' first :).

    Thanks Holger for the background. "actually not involved in PyPy" depends on your interpretation of what the word "involved" means. Besides performance related questions, as Holger indicates I've asked other questions of the PyPy project too. I wasn't altogether successful at it (nor altogether unsuccessful), and I'm on an extended break from asking any questions right now.

    I didn't write any of the PyPy code and also had nothing to do with the design of PyPy. I indeed asked for the --faassen option to be removed earlier this year. It was amusing (and flattering), but it also lead to some confusion concerning credit that I certainly don't deserve - that goes to the PyPy developers and project managers.

    ReplyDelete

See also PyPy's IRC channel: #pypy at freenode.net, or the pypy-dev mailing list.
If the blog post is old, it is pointless to ask questions here about it---you're unlikely to get an answer.