On 07/04/07, Fernando Perez <[EMAIL PROTECTED]> wrote: > You are correct. If g,h in the OP's description satisfy: > > a) they are bloody expensive > > b) they release the GIL internally via the proper C API calls, which > means they are promising not to modify any shared python objects > > the pure python threads approach could help *somewhat*.
I feel silly. Some (many?) numpy functions satisfy both criteria (dot, for example, when using BLAS, definitely allows threads and can be bloody expensive), but the OP is hardly likely to be using giant slow numpy functions and asking this question. How thorough is numpy's NPY_BEGIN_ALLOW_THREADS coverage? How about f2py-generated code? It should be fairly easy for f2py to tell when a hunk of FORTRAN might modify a shared python object (never?), and this would cover not only much of scipy but much user code as well. Anne _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
