develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [PATCH] lvalue hash and array elements

Thread Previous
From:
Simon Cozens
Date:
January 4, 2001 02:37
Subject:
Re: [PATCH] lvalue hash and array elements
Message ID:
20010104103519.A29202@deep-dark-truthful-mirror.perlhacker.org
On Wed, Jan 03, 2001 at 11:31:09PM -0800, Stephen McCamant wrote:
> (this assumes you dealt with aelemfast separately). Then LVRET would
> be `((PL_op->op_private & OPpMAYBE_LVALUE) && (cxstack ...))'. Or, it
> might be a little faster to write the test is pp_aelem as:
> 
> U32 lval;
> if (PL_op->op_flags & OPf_MOD) {
>     if (PL_op->op_private & OPpMAYBE_LVALUE)
>         lval = cxstack...;
>     else
>         lval = 1;
> }

You're now saying that three tests (mod, maybe_lvalue, cxstack) are faster
than three. (opnext, op we want, cxstack) And you're *still* mixing
compile-time and run-time decisions, which is exactly what you told me I
shouldn't be doing. *And* you want to do a lot of op tree walking at compile
time as well.

Colour me distinctly unimpressed.

-- 
Ever wake up feeling like a null pointer? -Allan Pratt

Thread Previous


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