Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Copy-restore on parameters? (was Re: Autovivi)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Deven T. Corzine  
View profile  
 More options Aug 15 2002, 4:48 pm
Newsgroups: perl.perl6.language
From: de...@ties.org (Deven T. Corzine)
Date: Thu, 15 Aug 2002 16:02:25 -0400 (EDT)
Local: Thurs, Aug 15 2002 4:02 pm
Subject: Re: Copy-restore on parameters? (was Re: Autovivi)

On Thu, 15 Aug 2002, Larry Wall wrote:
> On Thu, 15 Aug 2002, Deven T. Corzine wrote:
> : I've got another idea.  How about using a copy-restore technique?

> I suspect that would make Perl 6's sub calls even slower than Perl 5's.

Yes and no.

For the normal case (pass-by-value semantics), it should be about the same
speed as Perl 5, since it would be doing the same thing: making a copy of a
value that was passed by reference.

For the "is ro" or "is ref" case, it should be FASTER, since it could avoid
the copy by aliasing the reference.

Only the "is rw" case would be slower, since it would involve two copies
rather than one.  However, it would offer a benefit of "rolling back" any
changes to the parameters in case of an abnormal exit from the function.  
This seems like a valuable feature that could often be useful -- and anyone
who wants to avoid the speed penalty could stick with "is ref", assuming
that option is also allowed...

Deven


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.