develooper Front page | perl.perl6.internals | Postings from July 2002

Re: [COMMIT] Parrot_Context

Thread Previous | Thread Next
From:
dan
Date:
July 4, 2002 17:25
Subject:
Re: [COMMIT] Parrot_Context
Message ID:
a05111b02b94a96fc3e6c@[63.120.19.221]
At 12:43 AM +0200 7/5/02, Jerome Vouillon wrote:
>On Thu, Jul 04, 2002 at 05:08:25PM -0400, Melvin Smith wrote:
>>  Since context switches are not the norm (and register/stack accesses _are_)
>>  we decided to use a memcpy to switch them rather than using a
>>  pointer to a context.
>
>So, more than 2 kilobyte will be copied for each co-routine call?

Yep, looks that way currently. Should be reasonably tunable.

>(Save the caller context, restore the co-routine context, execute the
>  co-routine, save the co-routine context, restore the caller context.)
>
>This looks rather expansive to me!
>(Think about an iterator over a list, for instance.)

So try another way and benchmark the differences. If your scheme 
works better, it'll go in.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About