Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Re: Processing arrays 2 elements at a time (TIMTOWTDI)

by ichimunki (Priest)
on Aug 02, 2002 at 22:38 UTC ( #187240=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Processing arrays 2 elements at a time (TIMTOWTDI)
in thread Processing arrays 2 elements at a time (TIMTOWTDI)

I'm sorry. I guess I thought his requirements didn't preclude a destructive routine, since he opens with $r = [1,2,3,4,5,6] and wants to replace that with $r = [[1,2],[3,4],[5,6]] and both the shifter and splicer techniques in the benchmark are destructive. My money's on the c-loop for non-destructive, and if I had large tuples or frequently changing tuple lengths, I'd use splicer in spite of the speed hit shown here.


Comment on Re: Re: Re: Re: Processing arrays 2 elements at a time (TIMTOWTDI)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://187240]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-28 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls