Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    timethese(1E6, {
       'nospace' => sub { grep {/$nsre/} @data; },
       'isspace' => sub { grep {!/$isre/} @data; }})
    
  2. or download this
    Benchmark: timing 1000000 iterations of isspace, nospace...
       isspace: 67 wallclock secs (56.34 usr +  0.15 sys = 56.49 CPU) @ 17
    +702.25/s (n=1000000)
       nospace: 63 wallclock secs (49.19 usr +  0.26 sys = 49.45 CPU) @ 20
    +222.45/s (n=1000000)