Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Optimizing existing Perl code (in practise)

by grep (Monsignor)
on Aug 19, 2002 at 07:11 UTC ( #191099=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Benchmark;
    ...
                  'sprintf'  => 'sprintf "%x%x%x",ord("a"),ord("b"),ord("c
    +")'
                  }
              );
    
  2. or download this
    Benchmark: timing 1500000 iterations of sprintf, unpack...
       sprintf:  0 wallclock secs ( 0.17 usr +  0.00 sys =  0.17 CPU) @ 88
    +23529.41/s (n=1500000)
                (warning: too few iterations for a reliable count)
        unpack: 10 wallclock secs ( 9.87 usr +  0.01 sys =  9.88 CPU) @ 15
    +1821.86/s (n=1500000)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2019-06-19 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (84 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!