Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Experimental features: autoderef vs postfix deref

by BrowserUk (Patriarch)
on Jul 13, 2015 at 20:08 UTC ( [id://1134586]=note: print w/replies, xml ) Need Help??


in reply to Re: Experimental features: autoderef vs postfix deref
in thread Experimental features: autoderef vs postfix deref

Interesting, but probably not very significant.

A more interesting figure, that is probably impossible to measure, is what performance affect has this 'feature' had upon code that doesn't use it?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
  • Comment on Re^2: Experimental features: autoderef vs postfix deref

Replies are listed 'Best First'.
Re^3: Experimental features: autoderef vs postfix deref
by stevieb (Canon) on Jul 13, 2015 at 20:59 UTC
    I thought that if you don't request the code, it isn't loaded. Can you explain what you mean? Would it be that even though the feature isn't use'd, it's still intertwined enough to have effects?
      Would it be that even though the feature isn't use'd, it's still intertwined enough to have effects?

      It's that I suggested it would be good to measure.

      Many perl features exact a cost even for code that doesn't use them. Eg.

      1. Threads: I recall reading somewhere that building with threads cost something like 7% for code that made no use of them.
      2. Unicode: The presence of the code to deal with unicode, means at the very least a lot of extra boolean checks in code paths for code that doesn't use it.
      3. Tie: The ability to tie variables means passing through checks for its presence for almost every variable access.
      4. Many other kinds of magic impose similar complexities on code that doesn't use it; just to determine that it isn't used.

      Individually, none of them are hugely detrimental, but combine them all together and the affects on every opcode that has to go through is-it-unicode, is-it-tied, is-it-lvalue, is-it-shared, is-it-someother-magic, add up.

      Whether this has any such consequences was the question. shmem may be right that this is purely a syntactic sugar thing; recognised entirely at compile time; that compiles to identical code to the normal deref; and thus has no runtime consequences at all.

      But your numbers above seem to indicate there may be more to it than that.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
        Thanks BrowserUK, I plan to do much more testing solely so I can see for myself, but the comments on my post here have inspired me to run much more rigorous tests similar to this on platforms dedicated to only that, just to see.
        A reply falls below the community's threshold of quality. You may see it by logging in.
        One more thing... This is a nit and I'm on my phone so I'll cite when I get home, but my understanding of the original Larry idealism of Perl is that 'important bits be to the left' (single quoted as it might not be verbatim). If that's the case,  postderef goes against that principle. For me, it's whatever works so I don't care, but it is what it is.

        I *think* that's what I've read... I spent a lot of time over the weekend researching Perl.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found