Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Converting a string to a real numeric value - what's faster?

by mwah (Hermit)
on Sep 17, 2009 at 10:04 UTC ( #795837=note: print w/replies, xml ) Need Help??


in reply to Re^2: Converting a string to a real numeric value - what's faster?
in thread Converting a string to a real numeric value - what's faster?

if i am handling non-floating-point values, it's a bit more elegant ... to use int()

.. if it's worth the typed characters at all ;-)

As you said before, Perl will convert the string into a number internally if the string isn't already converted (IV-Flag not set) and if the string is used in a numerical context.

Of course, when using Perl-Guts (XS), you have to worry.

regards

mwa

  • Comment on Re^3: Converting a string to a real numeric value - what's faster?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2021-04-20 01:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?