[Python-Dev] tiny optimization in ceval mainloop

Skip Montanaro skip@pobox.com
Thu, 29 Aug 2002 20:37:29 -0500


    Greg> Could you have just one ticker, instead of one per thread?

That would make ticker really count down checkinterval ticks.  Also, of
possible interest is this declaration and comment in longobject.c:

    static int ticker;  /* XXX Could be shared with ceval? */

Any time C code would want to read or update ticker, it would have the GIL,
right?  Sounds like you could get away with a single ticker.  The long int
implementation appears to do just fine with only one...

Skip