http://www.perlmonks.org?node_id=1210498


in reply to Unexplained benchmark when using chop vs. chomp (or neither)

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Unexplained benchmark when using chop vs. chomp (or neither)

Replies are listed 'Best First'.
Re^2: Unexplained benchmark when using chop vs. chomp (or neither)
by Eily (Monsignor) on Mar 08, 2018 at 10:55 UTC

    four very different algorithms
    Well, benchmarking several times the same code and using the result to simulate a horse race is a legitimate use of Benchmark. But some people also use Benchmark to compare different algorithms that give the same result.

    Also, you neglect to place the three “Perl alternatives”
    As a matter of fact, since the issue is that the input data is modified by the chopping function, comparing them in the same run may have shown that all the variants gets faster when chop is called.

Re^2: Unexplained benchmark when using chop vs. chomp (or neither)
by stevieb (Canon) on Mar 08, 2018 at 04:31 UTC

    Will OP posting the "three Perl alternatives" help you write code for them?

    Why don't you present a solution; that is what this place is about.

    I admit that I comprehend your attention-getting now, but don't you get sick of being shunned, spit and shit on all the time?

    Seriously; my brother just called me the other day. He's been a troll for many years across mostly sports forums. Nonetheless, he told me "Steve, I'm angry all the time. I just interject in ways that attempt to antagonize people. I need to stop."

    Can you stop, or at least start to "pretend" to speak in a way where your rhetoric appears like you're not just a political advisor?

    If you do get off on "trolling", have the balls to say it. If not, please let us know what 1992 product you still service, along with how you "consult" and "advise" software companies.

Re^2: Unexplained benchmark when using chop vs. chomp (or neither)
by BrowserUk (Patriarch) on Mar 08, 2018 at 10:30 UTC

    Please show us 4 to 6 lines of Perl code that compiles, runs and does something useful. Go on. Surprise me.


    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". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
      "...4 to 6 lines of Perl code that compiles..."

      Mostly it is just a question of the his comments:

      perl -E 'say qq(I “just missed it,” I apologize in advance); // svc'

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

        Bareword found where operator expected at -e line 1, near "// svc" (Missing operator before svc?) syntax error at -e line 1, near "// svc " Execution of -e aborted due to compilation errors.
        ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,