Show
Ignore:
Timestamp:
10/07/08 15:48:46 (3 months ago)
Author:
bonnu
Message:

lang/perl/Method-Cached - derivation & syntax correct

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Method-Cached/trunk/t/benchmark2.pl

    r20848 r20895  
    66 
    77use Method::Cached::Manager -default => { 
    8     storage_class    => 'Cache::Memcached::Fast', 
    9     storage_args     => [ 
    10         { servers    => [qw/ 127.0.0.1:11211 /] }, 
     8    storage_class => 'Cache::Memcached::Fast', 
     9    storage_args  => [ 
     10        { servers => [qw/ 127.0.0.1:11211 /] }, 
    1111    ], 
    12     key_regularizer  => 'SERIALIZE', # SERIALIZE / LIST 
     12    key_rule      => 'LIST', # SERIALIZE / LIST 
    1313}; 
    1414 
    1515use Method::Cached2 -default => { 
    16     storage_class    => 'Cache::Memcached::Fast', 
    17     storage_args     => [ 
    18         { servers    => [qw/ 127.0.0.1:11211 /] }, 
     16    storage_class => 'Cache::Memcached::Fast', 
     17    storage_args  => [ 
     18        { servers => [qw/ 127.0.0.1:11211 /] }, 
    1919    ], 
    20     key_regularizer  => 'SERIALIZE', # SERIALIZE / LIST 
     20    key_rule      => 'LIST', # SERIALIZE / LIST 
    2121}; 
    2222 
     
    5959my $num = 13; 
    6060 
    61 my ($fib, $c_fib, $c2_fib, $f_fib, $m_fib); 
     61my ($fib, $c_fib, $c2_fib, $m_fib); 
    6262 
    6363sub fib    { $fib    = $num; $fib    = Dummy::fib($fib)           } 
     
    6666sub m_fib  { $m_fib  = $num; $m_fib  = Dummy::fib_memoize($m_fib) } 
    6767 
    68 cmpthese(1000, { 
     68cmpthese(10000, { 
    6969    'fib'     => \&fib, 
    7070    'Cached'  => \&c_fib,