Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Why not perl have raw/native type

by ikegami (Pope)
on Jan 11, 2020 at 06:04 UTC ( #11111315=note: print w/replies, xml ) Need Help??


in reply to Re^3: Why not perl have raw/native type
in thread Why not perl have raw/native type

None of those steps are skipped. The check needs to be performed if nothing else.

I'm just saying that (re)assigning a string to a variable already containing just a string (i.e. only the PV slot allocated, no magic attached) is comparably cheap compared to all the "whatnot" the perl intepreter does. Is this incorrect?

hmmm. The long list of checks I mentioned and similar ones are constantly being made. It's is quite a drain.

Is it cheap compared to the rest that Perl does? If you mean the guts of operations like doing a regex match or making a system call? sure. But compared to overheads in Perl? not really. (The things you identified basically happen at compile-time, except for what amounts to a C struct lookup. They're definitely not drains!)

Then the OP makes a valid point.

They do. You could get great speed boosts if you could leave out a lot of checks.

  • Comment on Re^4: Why not perl have raw/native type

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-11-30 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?