On Mon, Sep 29, 2008 at 01:53:44AM +1000, Vasily Chekalkin wrote:
> Patrick R. Michaud wrote:
>> This section of code would be much simpler (and more efficient)
>> by using the C<find_cclass> and C<find_not_cclass opcodes> instead of
>> individually examining each character one-at-a-time.
>>
>>> +.sub 'chop' :method
>>> +    len = length tmps
>>> +    if len == 0 goto done
>>> +    dec len
>>> +    substr tmps,tmps, 0, len
>>> ...
>>
>> PIR has a C<chop> opcode, perhaps we should use it?
>
> Definitely. But I just moved code around. Should I add TODO ticket for  
> cleaning up this code?

Yes, please.  And these are cleanups that someone should be able
to do with only a modest knowledge of PIR (and perhaps a good
chance to learn PIR :-).

Pm

Reply via email to