ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-dev
python-dev
Re: [Python-Dev] tiny optimization in ceval mainloop
by Guido van Rossum other posts by this author
Aug 30 2002 4:16PM messages near this date
Re: [Python-Dev] tiny optimization in ceval mainloop | RE: [Python-Dev] tiny optimization in ceval mainloop
>  Someone <wink> may wish to question the historical 10 too.  A few weeks ago
>  on c.l.py, a number of programs were posted showing that, on Linux, the
>  thread scheduling is such the the *offer* to switch threads every 10
>  bytecodes was usually declined:  the thread that got the GIL was
>  overwhelmingly most often the thread that released it, so that the whole
>  dance was overwhelmingly most often pure overhead.  This may be different
>  under 2.3, where the pthreads GIL is implemented via a semaphore rather than
>  a condvar.  But in that case, actually switching threads every 10 bytecodes
>  is an awful lot of thread switching (10 bytecodes don't take as long as they
>  used to <wink>).
>  
>  I don't know how to pick a good "one size fits all" value, but suspect 10 is
>  "clearly too small".  In app after app, people who discover
>  sys.setcheckinterval() discover soon after that performance improves if they
>  increase it.

Let's try 100 and see how that works.

--Guido van Rossum (home page: http://www.python.org/~guido/)

_______________________________________________
Python-Dev mailing list
Python-Dev@[...].org
http://mail.python.org/mailman/listinfo/python-dev
Thread:
Jeremy Hylton
Guido van Rossum
Greg Ewing
Skip Montanaro
Steve Holden
Steve Holden
Jeremy Hylton
Jack Jansen
Tim Peters
Guido van Rossum
Skip Montanaro
Tim Peters
Jack Jansen
Tim Peters
Jack Jansen
Guido van Rossum
Tim Peters
Skip Montanaro
Skip Montanaro
Guido van Rossum
Skip Montanaro
Guido van Rossum
Jeremy Hylton
Guido van Rossum
Tim Peters

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved