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

Re: (tye)Re: Benchmarking chop/substr/split

by larryl (Scribe)
on Mar 17, 2001 at 02:15 UTC ( #65045=note: print w/ replies, xml ) Need Help??


in reply to (tye)Re: Benchmarking chop/substr/split
in thread Benchmarking chop/substr/split

True, it might not be worth the bloat for something not frequently used. I'm just in a fuss because I read that gnat wants to take chop() out of the core.  I like chopchop is my friend.  I don't want to have to type  $a = substr($_,-1); substr($_,-1) = '' when what I want is  $a = chop .

Pout.

Besides, it's at least twice as fast every place I've tested it. If you need to check a few thousand credit cards a day, it makes a noticeable difference.


Comment on Re: (tye)Re: Benchmarking chop/substr/split
Select or Download Code
(tye)Re2: Benchmarking chop/substr/split
by tye (Cardinal) on Mar 17, 2001 at 02:19 UTC

    Yeah, I like chop too. FYI, you don't have to repeat the substr: $a= substr($_,-1,1,"");
    Though this doesn't work in older versions of Perl.

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-12-25 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls