Movatterモバイル変換
[0]ホーム
[Python-Dev] xreadlines : readlines :: xrange : range
Andrew Kuchlingakuchlin@mems-exchange.org
Thu, 4 Jan 2001 10:43:15 -0500
On Thu, Jan 04, 2001 at 03:59:05PM +0100, Thomas Wouters wrote:>getc_unlocked(). getc() is faster than flockfile(f) + getc_unlocked(f) (+>the rearranging of the function, use of PyTHREAD_ALLOW inside the outer loop,>etc.) Significantly so when there is only one thread running (which is stillSo it looks like the ALLOW_THREADS should be moved out of the forloop. This produced no measureable performance difference on Solaris;I'll leave it to GvR to try it on Linux. I wonder if FreeBSD has someunusually slow thread operation?--amk
[8]ページ先頭