develooper Front page | perl.perl5.porters | Postings from May 2012

Re: Removing from the opcode tree

Thread Previous | Thread Next
Steffen Mueller
May 23, 2012 23:17
Re: Removing from the opcode tree
Message ID:
On 05/18/2012 07:45 AM, Steffen Mueller wrote:
> On 05/16/2012 01:00 AM, Eric Brine wrote:
>> On Mon, May 14, 2012 at 7:37 PM, Father Chrysostomos via RT
>> < <>> wrote:
>> > Replacing the entersub op with something else is what
>> > cv_set_call_checker is for.
>> I haven't found an example that removes from the opcode tree. How would
>> I fill in the following call checker
> Maybe still useful: pp_sort detects and removes the branches of the op
> code tree that it can optimize with special purpose implementations of
> sort subs (basically variants of {$a cmp $b}. There's an old-ish branch
> of mine in the perl repository which adds optimization for {$a->[0] cmp
> $b->[0]} and its variants, but I could never really get the failure
> modes right when somebody passes in the wrong data structures. Mostly
> for lack of diligence. Look for "smueller/..." branches.

I failed to mention something here. It'll be obvious to most, but it's 
probably still worth stating: Don't do something like this at run time. 
OP trees being shared, this will break threaded perls.

I still eventually want to find a large gob of time and clue to make 
them thread safe. There's an old thread about that on this list. Look 
for Zefram's replies, as usual they're really good.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About