Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
      'One Big Regexp' => \&one_re,
      'With index()'   => \&use_index,
    });
    
  2. or download this
    Benchmark: timing 100000 iterations...
    One Big Regexp:  7 wallclock secs (6.22 CPU) @ 16077.17/s (n=100000)
    Several Regexp: 12 wallclock secs (11.27 CPU) @ 8873.11/s (n=100000)
    With index(): 11 wallclock secs (8.71 CPU) @ 11481.06/s (n=100000)