Re: future multi-threading for-loops

2008-02-05 Thread castironpi
On Feb 5, 1:21 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 04 Feb 2008 19:22:29 -0800, castironpi wrote: > > Some iterables and control loops can be multithreaded.  Worries that > > it takes a syntax change. > > > for X in A: > >     def f( x ): > >         normal suite( x ) >

Re: future multi-threading for-loops

2008-02-05 Thread John Nagle
Christian Heimes wrote: > [EMAIL PROTECTED] wrote: >> Multi-threaded control flow is a worthwhile priority. > > It is? That's totally new to me. Given the fact that threads don't scale > I highly doubt your claim, too. There's plenty that can be done to automatically extract parallelism from

Re: future multi-threading for-loops

2008-02-05 Thread dmitrey
On Feb 5, 6:11 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Multi-threaded control flow is a worthwhile priority. > > It is? That's totally new to me. Given the fact that threads don't scale > I highly doubt your claim, too. I would propose "for X IN A" for parall

Re: future multi-threading for-loops

2008-02-05 Thread dmitrey
On Feb 5, 5:22 am, [EMAIL PROTECTED] wrote: > Some iterables and control loops can be multithreaded. Worries that > it takes a syntax change. > > for X in A: > def f( x ): > normal suite( x ) > start_new_thread( target= f, args= ( X, ) ) > > Perhaps a control-flow wrapper, or metho

Re: future multi-threading for-loops

2008-02-05 Thread Christian Heimes
[EMAIL PROTECTED] wrote: > Multi-threaded control flow is a worthwhile priority. It is? That's totally new to me. Given the fact that threads don't scale I highly doubt your claim, too. -- http://mail.python.org/mailman/listinfo/python-list

Re: future multi-threading for-loops

2008-02-05 Thread Boris Borcic
[EMAIL PROTECTED] wrote: > On Feb 5, 12:26 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> On 5 feb, 03:46, [EMAIL PROTECTED] wrote: >> >>> Some timing stats: On Windows XP, Python 3.0a2. (...) >>> Are threads an OS bottleneck? >> I don't understand your threading issues, but I would not use 3.

Re: future multi-threading for-loops

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 19:22:29 -0800, castironpi wrote: > Some iterables and control loops can be multithreaded. Worries that > it takes a syntax change. > > for X in A: > def f( x ): > normal suite( x ) > start_new_thread( target= f, args= ( X, ) ) > > Perhaps a control-flow wrap

Re: future multi-threading for-loops

2008-02-04 Thread castironpi
On Feb 5, 12:26 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > On 5 feb, 03:46, [EMAIL PROTECTED] wrote: > > > Some timing stats: On Windows XP, Python 3.0a2. > > > [timing code, 10,000 calls] > > [ f( X ) ]: 0.0210021106034 > > [ start_new_thread( f, X ) ]: 1.15759908033 > > [ Thread( f, X ).s

Re: future multi-threading for-loops

2008-02-04 Thread Gabriel Genellina
On 5 feb, 03:46, [EMAIL PROTECTED] wrote: > Some timing stats: On Windows XP, Python 3.0a2. > > [timing code, 10,000 calls] > [ f( X ) ]: 0.0210021106034 > [ start_new_thread( f, X ) ]: 1.15759908033 > [ Thread( f, X ).start() ]: 1.85400099733 > [ Thread( f, X ).start and .join() ]: 1.93716743329

Re: future multi-threading for-loops

2008-02-04 Thread castironpi
On Feb 4, 9:22 pm, [EMAIL PROTECTED] wrote: > Some iterables and control loops can be multithreaded.  Worries that > it takes a syntax change. > > for X in A: >     def f( x ): >         normal suite( x ) >     start_new_thread( target= f, args= ( X, ) ) > > Perhaps a control-flow wrapper, or metho

future multi-threading for-loops

2008-02-04 Thread castironpi
Some iterables and control loops can be multithreaded. Worries that it takes a syntax change. for X in A: def f( x ): normal suite( x ) start_new_thread( target= f, args= ( X, ) ) Perhaps a control-flow wrapper, or method on iterable. @parallel for X in A: normal suite( X )