Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Newbie question

by Marshall (Canon)
on Aug 23, 2022 at 15:48 UTC ( [id://11146324]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Newbie question
in thread Newbie question

What I was trying to say is that the easiest to "code and understand" way is also likely to be the fastest way. And I was encouraging that. It really doesn't matter how good/bad the detailed implementation of abs() is, the time to execute the worst imaginable implementation is likely faster than making decisions about default behavior in light of an exception (the '-') and also suppressing normal exception behavior. I also suspect that either choice is completely dwarfed by the by the split operation and creation of the list of individual numbers.

I don't think any benchmarking or further optimization is warranted here. I vote for the easy to understand way.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-24 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found