develooper Front page | perl.perl5.porters | Postings from April 2008

Re: Make built-in list functions continuous

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
April 2, 2008 05:51
Subject:
Re: Make built-in list functions continuous
Message ID:
b77c1dce0804020551i5f2df65aldf1f1b64fa58937b@mail.gmail.com
On 02/04/2008, Dave Mitchell <davem@iabyn.com> wrote:
> On Tue, Apr 01, 2008 at 02:49:47PM +0100, Nicholas Clark wrote:
>  > I don't know how long it took Dave to
>  > implement in-place sort (`@glurp = sort @glurp`)
>
>
> My vague recollection is that it was quite hard, and then I broke
>  something (can't remember what now).

hange 22839 by davem@davem-percy on 2004/05/22 11:15:34

         [perl #29790] Optimization busted: '@a = "b", sort @a' drops "b"
         Fix the sort-in-place optimization of change #22349.

>  Generally, optimisations that involve examining an area of the optree looking
>  for a particular pattern and replacing it with something else, are hard
>  to do, and are very fragile - a slight change to the optree (something as
>  trivial as an op_null added or removed by some other fix), and the
>  optimisation gets inadvertently disabled, or worse, breaks things.

And it's difficult to write exhaustive tests for those.

I remember a couple of bugs with the introduction op_rcatline as well.

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