On Mon, Jan 30, 2012 at 7:40 PM, Davide Setti <[email protected]> wrote: > On Mon, Jan 30, 2012 at 5:05 PM, Maciej Fijalkowski <[email protected]> > wrote: >> >> I think it does not matter, and for >> more than one reason in this particular case (on of those being that >> even though bool objects are boxed, there are only two of them - True >> and False) > > > Probably this is another question: what about using 1 and 0 instead of True > and False?\
Not any different in this case. > > In (your) jitviewer i see that the "infinite while loops" 'while 1' is > better than 'while True'. Am i right? Is it faster in the validatePhone case > too? Is it possible to remove this (very small) overhead with the JIT? > > Thanks > -- > > Davide Setti > code: http://github.com/vad The actual loop for while 1: and while True: is not different, only the preamble differs. It's generally faster in the interpreted mode because you don't have to check if the global True is not rebinded. Example: while True: ... if some_condition: True = False _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
