Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: RFC extending Benchmark.pm to facilitate CODEHASHREF

by LanX (Saint)
on Nov 27, 2013 at 02:13 UTC ( [id://1064517]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC extending Benchmark.pm to facilitate CODEHASHREF
in thread RFC extending Benchmark.pm to facilitate CODEHASHREF

> Thus, the timing produced by the module incorporate three levels of subroutine call, only one of which has been partially negated. This demonstrates the naivety of the author(s).

WOW really? Oh man, thank you for telling me!

Well, unfortunately I've never done this.

> If you write the benchmark in 1064279 like this:

Which is Kenosis code, not the code I wrote.

(playing tricks again you funny little bastard? Ha ha ha ... yawn)

The approach of hashes with

{ name1 => sub { }, name2 => sub { }, }

is well known. but it's sufficiently different to easily introduce errors.

Especially when copying existing code, things like comma-separation, indentation, positions of names, ... (see also Eily's comment).

Secondly and more importantly the need to benchmark often comes if code has already been written and experimenting starts with cloned forms of

sub do_something { # not fast enough }

then called

sub do_something_old { ... }

or

sub do_something_1 { ... }

And I don't think I'm alone, two other monks already asked about filtering some subs out of a package and/or ignoring imported subs.

Now if you don't like a convenience module to facilitate this kind of benchmarking, better don't use it.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^3: RFC extending Benchmark.pm to facilitate CODEHASHREF
by BrowserUk (Patriarch) on Nov 27, 2013 at 02:25 UTC
    Which is Kenosis code, not the code I wrote. (playing tricks again you funny little bastard ... yawn)

    As clearly identified in the post to which I linked, (so no "trick"). Instead you write crap like this.


    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.
      > Instead you write crap like this.

      Again resorting to vulgarities when your tricks fail?

      Cheers Rolf

      ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

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

    No recent polls found