Benchmarking Perl Lightning Talk (NPW 2007)

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Groups & 1 Event

    Benchmarking Perl Lightning Talk (NPW 2007) - Presentation Transcript

    1. Benchmarking Perl brian d foy <brian@stonehenge.com> Stonehenge Consulting Ser vices Nordic Perl Workshop 2007 Lightning Talk Edition
    2. Benchmarks are reference points
    3. All Things Being Equal... There are lies, damned lies, and benchmarks Everyone has an agenda You don’t run testbeds as production Skepticism wins the day
    4. Language Shootout Benchmarking programming languages? How can we benchmark a programming language? We can't - we benchmark programming language implementations. How can we benchmark language implementations? We can't - we measure particular programs. http:/ /shootout.alioth.debian.org/
    5. Availability Disk Use Concurrent Users CPU Time Completion Time Memory Use Uptime Bandwidth Use Network Lag Responsiveness Binary Size Programmer Time
    6. Programmer Ti me
    7. Theory of Measurement Obser vation changes the universe Nothing is objective Tools have inherent uncertainities
    8. Modules Devel::Size - size(), total_size() Devel::Peek - mstat() DBI::Profile Benchmark Devel::DProf, Devel::Smallprof
    9. Common Benchmark misuse use Benchmark 'cmpthese'; my @long = ('a' .. 'z', ''); my $iter = shift || -1; cmpthese( $iter,{ long_block_ne => q{grep {$_ ne ''} @long}, long_block_len => q{grep {length} @long}, long_bare_ne => q{grep $_ ne '', @long}, long_bare_len => q{grep length, @long}, } ); http:/ /www.perlmonks.org/index.pl?node_id=536503
    10. What’s wrong with this picture? Rate bare_ne block_len block_ne bare_len long_bare_ne 3635361/s -- -6% -6% -8% long_block_len 3869054/s 6% -- -0% -2% long_block_ne 3872708/s 7% 0% -- -2% long_bare_len 3963159/s 9% 2% 2% --
    11. Do something useful use Benchmark 'cmpthese'; our @long = ('a' .. 'z', ''); my $iter = shift || -1; cmpthese( $iter,{ long_block_ne => q{my @array = grep {$_ ne ''} @long}, long_block_len => q{my @array = grep {length} @long}, long_bare_ne => q{my @array = grep $_ ne '', @long}, long_bare_len => q{my @array = grep length, @long}, } );
    12. These numbers make sense 15” Powerbook G5, Mac OS X.4.5, perl5.8.4 Rate block_ne block_len bare_ne bare_len long_block_ne 31210/s -- -3% -3% -5% long_block_len 32119/s 3% -- -0% -2% long_bare_ne 32237/s 3% 0% -- -2% long_bare_len 32755/s 5% 2% 2% --
    13. Conclusion Decide what is important to you Realize you have bias Report the situation Don’t turn off your brain Make predictions that you can verify

    + _brian d _foy_brian d _foy, 2 years ago

    custom

    963 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 963
      • 963 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories