Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: No More Meaningless Benchmarks!

by gam3 (Curate)
on Dec 09, 2006 at 22:31 UTC ( [id://588824]=note: print w/replies, xml ) Need Help??


in reply to No More Meaningless Benchmarks!

To point out that this benchmark is even more useless: I would think that the major differences between double and single quotes are going to be at compile time and not run time, and this benchmark only times the runtime differences.
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: No More Meaningless Benchmarks!
by liverpole (Monsignor) on Dec 09, 2006 at 23:32 UTC
    Excellent point!  ++gam3.

    To prove it to myself ...

    #!/usr/bin/perl -w use strict; use warnings; my $d = "This is a double-quote string\n"; my $s = 'This is a single-quote (apostrophe) string' . "\n"; print $d; print $s; # Results ... BEGIN { $^W = 1; } use warnings; use strict 'refs'; my $d = "This is a double-quote string\n"; my $s = "This is a single-quote (apostrophe) string\n"; print $d; print $s; quotes.pl syntax OK

    Looks pretty convincing to me!


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
Re^2: No More Meaningless Benchmarks!
by sgt (Deacon) on Dec 10, 2006 at 18:21 UTC

    Very true. I was going to mention that myself.

    Still i believe a benchmark always says something. It's like profiling; it is often important to think about using it. Even if the benchmark tells nothing in a case like this one, still, the effort of thinking about why it does not tell anything is a useful exercise.

    hth --stephan
Re^2: No More Meaningless Benchmarks!
by belg4mit (Prior) on Aug 27, 2008 at 16:58 UTC

Log In?
Username:
Password:

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

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

    No recent polls found