Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
            }
        },
    });
    
  2. or download this
    Benchmark: timing 100000 iterations ...
    alternation, grouping: 12 wallclock secs (11.92 usr +  0.00 sys = 11.9
    +2 CPU) @ 8389.26/s (n=100000)
    alternation, no grouping:  0 wallclock secs ( 0.19 usr +  0.00 sys =  
    +0.19 CPU) @ 526315.79/s (n=100000)
                (warning: too few iterations for a reliable count)
    loop, grouping:  2 wallclock secs ( 1.33 usr +  0.00 sys =  1.33 CPU) 
    +@ 75187.97/s (n=100000)
    loop, no grouping:  1 wallclock secs ( 1.33 usr +  0.00 sys =  1.33 CP
    +U) @ 75187.97/s (n=100000)