$ perl foo Rate end_of_substring end_slurped tr_and_end all tr_and_match while split tr_and_split_redux tr_and_split tr tr_moar_magic end_of_substring 56818/s -- -7% -7% -15% -16% -37% -52% -61% -62% -63% -65% end_slurped 60976/s 7% -- -1% -9% -10% -32% -49% -59% -60% -60% -62% tr_and_end 61350/s 8% 1% -- -9% -9% -32% -48% -58% -60% -60% -62% all 67114/s 18% 10% 9% -- -1% -26% -44% -54% -56% -56% -58% tr_and_match 67568/s 19% 11% 10% 1% -- -25% -43% -54% -55% -56% -58% while 90090/s 59% 48% 47% 34% 33% -- -24% -39% -41% -41% -44% split 119048/s 110% 95% 94% 77% 76% 32% -- -19% -21% -23% -26% tr_and_split_redux 147059/s 159% 141% 140% 119% 118% 63% 24% -- -3% -4% -9% tr_and_split 151515/s 167% 148% 147% 126% 124% 68% 27% 3% -- -2% -6% tr 153846/s 171% 152% 151% 129% 128% 71% 29% 5% 2% -- -5% tr_moar_magic 161290/s 184% 165% 163% 140% 139% 79% 35% 10% 6% 5% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr tr_and_split tr_and_split_redux tr_moar_magic end_of_substring 59172/s -- -2% -5% -12% -15% -37% -50% -61% -62% -62% -63% tr_and_end 60606/s 2% -- -2% -10% -13% -35% -48% -60% -61% -61% -62% end_slurped 62112/s 5% 2% -- -8% -11% -34% -47% -59% -60% -60% -61% all 67568/s 14% 11% 9% -- -3% -28% -43% -55% -56% -56% -58% tr_and_match 69930/s 18% 15% 13% 3% -- -25% -41% -54% -55% -55% -57% while 93458/s 58% 54% 50% 38% 34% -- -21% -38% -39% -39% -42% split 117647/s 99% 94% 89% 74% 68% 26% -- -22% -24% -24% -27% tr 151515/s 156% 150% 144% 124% 117% 62% 29% -- -2% -2% -6% tr_and_split 153846/s 160% 154% 148% 128% 120% 65% 31% 2% -- -0% -5% tr_and_split_redux 153846/s 160% 154% 148% 128% 120% 65% 31% 2% 0% -- -5% tr_moar_magic 161290/s 173% 166% 160% 139% 131% 73% 37% 6% 5% 5% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split tr_and_split_redux tr_moar_magic tr end_of_substring 58140/s -- -2% -6% -11% -15% -38% -48% -60% -60% -62% -62% tr_and_end 59172/s 2% -- -4% -9% -14% -37% -47% -60% -60% -61% -62% end_slurped 61728/s 6% 4% -- -6% -10% -34% -45% -58% -58% -59% -60% all 65359/s 12% 10% 6% -- -5% -30% -42% -56% -56% -57% -58% tr_and_match 68493/s 18% 16% 11% 5% -- -27% -39% -53% -53% -55% -55% while 93458/s 61% 58% 51% 43% 36% -- -17% -36% -36% -38% -39% split 112360/s 93% 90% 82% 72% 64% 20% -- -24% -24% -26% -27% tr_and_split 147059/s 153% 149% 138% 125% 115% 57% 31% -- -0% -3% -4% tr_and_split_redux 147059/s 153% 149% 138% 125% 115% 57% 31% 0% -- -3% -4% tr_moar_magic 151515/s 161% 156% 145% 132% 121% 62% 35% 3% 3% -- -2% tr 153846/s 165% 160% 149% 135% 125% 65% 37% 5% 5% 2% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr tr_and_split tr_moar_magic end_of_substring 58140/s -- -2% -4% -14% -15% -37% -49% -61% -62% -62% -63% tr_and_end 59524/s 2% -- -2% -12% -12% -35% -48% -60% -61% -61% -62% end_slurped 60606/s 4% 2% -- -10% -11% -34% -47% -59% -60% -60% -61% all 67568/s 16% 14% 11% -- -1% -26% -41% -55% -55% -55% -57% tr_and_match 68027/s 17% 14% 12% 1% -- -26% -41% -54% -55% -55% -56% while 91743/s 58% 54% 51% 36% 35% -- -20% -39% -39% -39% -41% split 114943/s 98% 93% 90% 70% 69% 25% -- -23% -24% -24% -26% tr_and_split_redux 149254/s 157% 151% 146% 121% 119% 63% 30% -- -1% -1% -4% tr 151515/s 161% 155% 150% 124% 123% 65% 32% 2% -- -0% -3% tr_and_split 151515/s 161% 155% 150% 124% 123% 65% 32% 2% 0% -- -3% tr_moar_magic 156250/s 169% 162% 158% 131% 130% 70% 36% 5% 3% 3% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr tr_and_split tr_moar_magic end_of_substring 57803/s -- -4% -6% -12% -14% -36% -50% -62% -63% -63% -65% tr_and_end 60241/s 4% -- -2% -8% -11% -34% -48% -61% -61% -61% -64% end_slurped 61728/s 7% 2% -- -6% -9% -32% -47% -60% -60% -60% -63% all 65359/s 13% 8% 6% -- -3% -28% -44% -58% -58% -58% -61% tr_and_match 67568/s 17% 12% 9% 3% -- -26% -42% -56% -57% -57% -59% while 90909/s 57% 51% 47% 39% 35% -- -22% -41% -42% -42% -45% split 116279/s 101% 93% 88% 78% 72% 28% -- -24% -26% -26% -30% tr_and_split_redux 153846/s 166% 155% 149% 135% 128% 69% 32% -- -2% -2% -8% tr 156250/s 170% 159% 153% 139% 131% 72% 34% 2% -- 0% -6% tr_and_split 156250/s 170% 159% 153% 139% 131% 72% 34% 2% 0% -- -6% tr_moar_magic 166667/s 188% 177% 170% 155% 147% 83% 43% 8% 7% 7% -- #### #!/opt/local/bin/perl use warnings; use strict; use Benchmark qw(:all); my $fh = *DATA; my $start = tell DATA; cmpthese(100000, { all => '_all', while => '_while', split => '_split', end_of_substring => '_end_of_substring', end_slurped => '_end_slurped', tr_and_match => '_tr_and_match', tr => '_tr', tr_moar_magic => '_tr_moar_magic', tr_and_split => '_tr_and_split', tr_and_split_redux => '_tr_and_split_redux', tr_and_end => '_tr_and_end', }); sub _all { seek $fh, $start, 0; my $count = 0; while (<$fh>){ $count += () = /(M+)/g; } # print "all: $count\n"; } sub _while { seek $fh, $start, 0; my $count=0; while(<$fh>){ while($_=~/(M+)/g){ $count++; } } # print "while: $count\n"; } sub _end_of_substring { seek $fh, $start, 0; my $count = 0; while ( <$fh> ) { $count += () = m/M[^M]/g; } # print "end_of_substring: $count\n"; } sub _end_slurped { seek $fh, $start, 0; local $/; $_ = <$fh>; my $count = () = m/M[^M]/g; # print "end_slurped: $count\n"; } sub _split { seek $fh, $start, 0; local $/; my $count = ( split /[^M]+/, <$fh> ) - 1; # print "split: $count\n"; } sub _tr { seek $fh, $start, 0; local $/; $_ = <$fh>; my $count = tr/M// =~ tr/M/M/sr; # print "tr: $count\n"; } sub _tr_moar_magic { seek $fh, $start, 0; local $/; $_ = <$fh>; tr/M/M/s; my $count = tr/M//; # print "tr: $count\n"; } sub _tr_and_split { seek $fh, $start, 0; local $/; $_ = <$fh>; tr/M/I/cs; my $count = (split /I/) - 1; # print "tr_and_split: $count\n"; } sub _tr_and_split_redux { seek $fh, $start, 0; local $/; $_ = <$fh>; tr/M/I/cs; tr/M/M/s; my $count = (split /I/) - 1; # print "tr_and_split_redux: $count\n"; } sub _tr_and_end { seek $fh, $start, 0; local $/; $_ = <$fh>; tr/M/I/cs; my $count = () = m/M[^M]/g; # print "tr_and_end: $count\n"; } sub _tr_and_match { seek $fh, $start, 0; local $/; $_ = <$fh>; $_ = tr/M/ /csr; my $count = () = m/(M)+/g; # print "tr_and_match: $count\n"; } __DATA__ IIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI M #### $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 13263/s -- -12% -14% -18% -32% -54% -72% -89% -89% -90% -91% tr_and_end 15083/s 14% -- -3% -7% -23% -47% -68% -87% -88% -88% -89% end_slurped 15480/s 17% 3% -- -5% -21% -46% -67% -87% -88% -88% -89% all 16234/s 22% 8% 5% -- -17% -43% -66% -86% -87% -88% -89% tr_and_match 19608/s 48% 30% 27% 21% -- -32% -58% -83% -84% -85% -86% while 28653/s 116% 90% 85% 77% 46% -- -39% -76% -77% -78% -80% split 47170/s 256% 213% 205% 191% 141% 65% -- -60% -62% -64% -67% tr_and_split_redux 117647/s 787% 680% 660% 625% 500% 311% 149% -- -6% -9% -18% tr_and_split 125000/s 842% 729% 707% 670% 537% 336% 165% 6% -- -4% -13% tr_moar_magic 129870/s 879% 761% 739% 700% 562% 353% 175% 10% 4% -- -9% tr 142857/s 977% 847% 823% 780% 629% 399% 203% 21% 14% 10% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 12594/s -- -16% -18% -18% -35% -55% -73% -89% -89% -90% -91% tr_and_end 15015/s 19% -- -2% -3% -23% -46% -68% -86% -87% -88% -89% end_slurped 15267/s 21% 2% -- -1% -21% -45% -67% -86% -87% -87% -89% all 15432/s 23% 3% 1% -- -20% -45% -67% -86% -87% -87% -89% tr_and_match 19380/s 54% 29% 27% 26% -- -30% -58% -82% -83% -84% -86% while 27855/s 121% 86% 82% 81% 44% -- -40% -75% -76% -77% -79% split 46512/s 269% 210% 205% 201% 140% 67% -- -58% -60% -61% -66% tr_and_split_redux 109890/s 773% 632% 620% 612% 467% 295% 136% -- -4% -9% -19% tr_and_split 114943/s 813% 666% 653% 645% 493% 313% 147% 5% -- -5% -15% tr_moar_magic 120482/s 857% 702% 689% 681% 522% 333% 159% 10% 5% -- -11% tr 135135/s 973% 800% 785% 776% 597% 385% 191% 23% 18% 12% -- $ perl foo Rate end_of_substring all tr_and_end end_slurped tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 12063/s -- -16% -19% -19% -36% -57% -74% -89% -89% -90% -91% all 14430/s 20% -- -3% -4% -24% -49% -69% -87% -87% -88% -89% tr_and_end 14837/s 23% 3% -- -1% -22% -47% -68% -86% -87% -88% -89% end_slurped 14970/s 24% 4% 1% -- -21% -47% -68% -86% -87% -87% -88% tr_and_match 18904/s 57% 31% 27% 26% -- -33% -59% -82% -83% -84% -85% while 28169/s 134% 95% 90% 88% 49% -- -39% -74% -75% -76% -78% split 46296/s 284% 221% 212% 209% 145% 64% -- -57% -59% -61% -64% tr_and_split_redux 107527/s 791% 645% 625% 618% 469% 282% 132% -- -5% -10% -17% tr_and_split 113636/s 842% 687% 666% 659% 501% 303% 145% 6% -- -5% -12% tr_moar_magic 119048/s 887% 725% 702% 695% 530% 323% 157% 11% 5% -- -8% tr 129870/s 977% 800% 775% 768% 587% 361% 181% 21% 14% 9% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 13210/s -- -13% -14% -19% -33% -54% -72% -89% -89% -90% -91% tr_and_end 15267/s 16% -- -1% -6% -23% -46% -68% -87% -88% -88% -89% end_slurped 15432/s 17% 1% -- -5% -22% -46% -67% -87% -88% -88% -89% all 16287/s 23% 7% 6% -- -17% -43% -66% -86% -87% -87% -88% tr_and_match 19724/s 49% 29% 28% 21% -- -31% -58% -83% -84% -85% -86% while 28409/s 115% 86% 84% 74% 44% -- -40% -76% -77% -78% -80% split 47393/s 259% 210% 207% 191% 140% 67% -- -60% -62% -64% -66% tr_and_split_redux 119048/s 801% 680% 671% 631% 504% 319% 151% -- -5% -8% -15% tr_and_split 125000/s 846% 719% 710% 667% 534% 340% 164% 5% -- -4% -11% tr_moar_magic 129870/s 883% 751% 742% 697% 558% 357% 174% 9% 4% -- -8% tr 140845/s 966% 823% 813% 765% 614% 396% 197% 18% 13% 8% -- $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 13175/s -- -12% -14% -18% -33% -52% -72% -89% -90% -90% -91% tr_and_end 14948/s 13% -- -3% -7% -24% -46% -68% -87% -88% -88% -90% end_slurped 15337/s 16% 3% -- -4% -22% -44% -67% -87% -88% -88% -89% all 16051/s 22% 7% 5% -- -18% -42% -65% -87% -87% -88% -89% tr_and_match 19569/s 49% 31% 28% 22% -- -29% -58% -84% -85% -85% -86% while 27548/s 109% 84% 80% 72% 41% -- -40% -77% -79% -79% -81% split 46296/s 251% 210% 202% 188% 137% 68% -- -61% -64% -64% -68% tr_and_split_redux 119048/s 804% 696% 676% 642% 508% 332% 157% -- -7% -8% -17% tr_and_split 128205/s 873% 758% 736% 699% 555% 365% 177% 8% -- -1% -10% tr_moar_magic 129870/s 886% 769% 747% 709% 564% 371% 181% 9% 1% -- -9% tr 142857/s 984% 856% 831% 790% 630% 419% 209% 20% 11% 10% -- #### __DATA__ IIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI M IIIIIIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI MIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI MIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI MIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI MIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM IIIIIIMMMMOOOOOMMMMIIIIIIIIIIIIIMMIIII MIM IMI M #### $ perl foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 2634/s -- -18% -18% -23% -39% -58% -77% -95% -96% -96% -97% tr_and_end 3194/s 21% -- -1% -7% -26% -49% -72% -94% -95% -95% -97% end_slurped 3227/s 23% 1% -- -6% -25% -48% -72% -94% -95% -95% -97% all 3419/s 30% 7% 6% -- -21% -45% -70% -94% -94% -94% -97% tr_and_match 4325/s 64% 35% 34% 27% -- -30% -62% -92% -93% -93% -96% while 6207/s 136% 94% 92% 82% 44% -- -46% -89% -90% -90% -94% split 11416/s 333% 257% 254% 234% 164% 84% -- -79% -81% -82% -88% tr_and_split_redux 54054/s 1952% 1592% 1575% 1481% 1150% 771% 374% -- -9% -13% -45% tr_and_split 59172/s 2147% 1753% 1734% 1631% 1268% 853% 418% 9% -- -5% -40% tr_moar_magic 62112/s 2258% 1845% 1825% 1717% 1336% 901% 444% 15% 5% -- -37% tr 99010/s 3659% 3000% 2968% 2796% 2189% 1495% 767% 83% 67% 59% -- #### $ perl5.22 foo Rate end_of_substring all tr_and_end end_slurped while tr_and_match split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 3160/s -- -16% -29% -30% -39% -48% -72% -95% -95% -95% -97% all 3775/s 19% -- -15% -17% -27% -38% -67% -94% -94% -94% -96% tr_and_end 4439/s 40% 18% -- -2% -14% -28% -61% -92% -93% -93% -96% end_slurped 4537/s 44% 20% 2% -- -12% -26% -60% -92% -93% -93% -96% while 5160/s 63% 37% 16% 14% -- -16% -54% -91% -92% -92% -95% tr_and_match 6124/s 94% 62% 38% 35% 19% -- -46% -90% -91% -91% -94% split 11274/s 257% 199% 154% 148% 118% 84% -- -81% -83% -83% -89% tr_and_split_redux 59172/s 1773% 1467% 1233% 1204% 1047% 866% 425% -- -8% -9% -44% tr_and_split 64516/s 1942% 1609% 1354% 1322% 1150% 954% 472% 9% -- -1% -39% tr_moar_magic 64935/s 1955% 1620% 1363% 1331% 1158% 960% 476% 10% 1% -- -38% tr 105263/s 3232% 2688% 2272% 2220% 1940% 1619% 834% 78% 63% 62% -- $ perl5.22 foo Rate end_of_substring all tr_and_end end_slurped while tr_and_match split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 3176/s -- -17% -31% -33% -41% -50% -73% -95% -95% -95% -97% all 3828/s 21% -- -17% -19% -29% -39% -67% -94% -94% -94% -97% tr_and_end 4598/s 45% 20% -- -3% -15% -27% -61% -92% -93% -93% -96% end_slurped 4730/s 49% 24% 3% -- -12% -25% -59% -92% -93% -93% -96% while 5405/s 70% 41% 18% 14% -- -14% -54% -91% -92% -92% -95% tr_and_match 6313/s 99% 65% 37% 33% 17% -- -46% -89% -90% -91% -94% split 11641/s 267% 204% 153% 146% 115% 84% -- -81% -82% -83% -90% tr_and_split_redux 59880/s 1786% 1464% 1202% 1166% 1008% 849% 414% -- -9% -11% -47% tr_and_split 65789/s 1972% 1618% 1331% 1291% 1117% 942% 465% 10% -- -2% -41% tr_moar_magic 67114/s 2013% 1653% 1360% 1319% 1142% 963% 477% 12% 2% -- -40% tr 112360/s 3438% 2835% 2344% 2275% 1979% 1680% 865% 88% 71% 67% -- #### $ perl5.14.4 foo Rate end_of_substring end_slurped tr_and_end all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 2672/s -- -19% -19% -22% -38% -59% -78% -95% -96% -96% -97% end_slurped 3298/s 23% -- -0% -3% -23% -49% -73% -94% -95% -95% -97% tr_and_end 3312/s 24% 0% -- -3% -23% -49% -73% -94% -95% -95% -97% all 3406/s 27% 3% 3% -- -20% -47% -72% -93% -94% -94% -97% tr_and_match 4277/s 60% 30% 29% 26% -- -34% -65% -92% -93% -93% -96% while 6443/s 141% 95% 95% 89% 51% -- -47% -88% -89% -89% -94% split 12255/s 359% 272% 270% 260% 187% 90% -- -77% -80% -80% -88% tr_and_split_redux 52356/s 1859% 1487% 1481% 1437% 1124% 713% 327% -- -14% -15% -48% tr_and_split 60606/s 2168% 1738% 1730% 1679% 1317% 841% 395% 16% -- -1% -40% tr_moar_magic 61350/s 2196% 1760% 1752% 1701% 1334% 852% 401% 17% 1% -- -39% tr 101010/s 3680% 2963% 2949% 2866% 2262% 1468% 724% 93% 67% 65% -- #### $ perl5.18.4 foo Rate end_of_substring tr_and_end end_slurped all tr_and_match while split tr_and_split_redux tr_moar_magic tr_and_split tr end_of_substring 2651/s -- -13% -15% -16% -35% -49% -77% -95% -95% -95% -98% tr_and_end 3049/s 15% -- -3% -4% -25% -42% -74% -94% -95% -95% -97% end_slurped 3131/s 18% 3% -- -1% -23% -40% -73% -94% -95% -95% -97% all 3168/s 19% 4% 1% -- -22% -40% -73% -94% -95% -95% -97% tr_and_match 4060/s 53% 33% 30% 28% -- -23% -65% -92% -93% -93% -96% while 5244/s 98% 72% 67% 66% 29% -- -55% -90% -91% -91% -95% split 11710/s 342% 284% 274% 270% 188% 123% -- -77% -80% -80% -89% tr_and_split_redux 51020/s 1824% 1573% 1530% 1511% 1157% 873% 336% -- -13% -13% -53% tr_moar_magic 58480/s 2106% 1818% 1768% 1746% 1340% 1015% 399% 15% -- -1% -46% tr_and_split 58824/s 2119% 1829% 1779% 1757% 1349% 1022% 402% 15% 1% -- -45% tr 107527/s 3956% 3427% 3334% 3295% 2548% 1951% 818% 111% 84% 83% -- #### $ perl5.20 foo Rate end_of_substring all tr_and_end end_slurped tr_and_match while split tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 2752/s -- -13% -27% -28% -42% -49% -77% -95% -96% -96% -98% all 3159/s 15% -- -16% -17% -33% -42% -74% -94% -95% -95% -97% tr_and_end 3759/s 37% 19% -- -2% -20% -31% -69% -93% -94% -94% -97% end_slurped 3828/s 39% 21% 2% -- -19% -30% -68% -93% -94% -94% -97% tr_and_match 4728/s 72% 50% 26% 23% -- -13% -61% -91% -92% -93% -96% while 5432/s 97% 72% 44% 42% 15% -- -55% -90% -91% -92% -95% split 12019/s 337% 281% 220% 214% 154% 121% -- -78% -81% -82% -89% tr_and_split_redux 55249/s 1908% 1649% 1370% 1343% 1069% 917% 360% -- -12% -15% -51% tr_and_split 62500/s 2171% 1879% 1563% 1533% 1222% 1051% 420% 13% -- -4% -44% tr_moar_magic 65359/s 2275% 1969% 1639% 1607% 1282% 1103% 444% 18% 5% -- -42% tr 112360/s 3983% 3457% 2889% 2835% 2276% 1969% 835% 103% 80% 72% -- #### $ perl5.8.9 foo Use of implicit split to @_ is deprecated at foo line 65. Use of implicit split to @_ is deprecated at foo line 91. Use of implicit split to @_ is deprecated at foo line 101. Rate end_of_substring all tr_and_end end_slurped split while tr_and_split_redux tr_and_split tr_moar_magic end_of_substring 3911/s -- -17% -18% -21% -47% -57% -72% -73% -93% all 4686/s 20% -- -2% -6% -36% -49% -66% -67% -92% tr_and_end 4796/s 23% 2% -- -3% -35% -47% -65% -66% -92% end_slurped 4960/s 27% 6% 3% -- -32% -45% -64% -65% -91% split 7348/s 88% 57% 53% 48% -- -19% -47% -48% -87% while 9099/s 133% 94% 90% 83% 24% -- -34% -36% -84% tr_and_split_redux 13831/s 254% 195% 188% 179% 88% 52% -- -3% -76% tr_and_split 14245/s 264% 204% 197% 187% 94% 57% 3% -- -75% tr_moar_magic 57803/s 1378% 1134% 1105% 1065% 687% 535% 318% 306% -- #### $ perl5.10.1 foo Use of implicit split to @_ is deprecated at foo line 65. Use of implicit split to @_ is deprecated at foo line 91. Use of implicit split to @_ is deprecated at foo line 101. Rate end_of_substring tr_and_end end_slurped all split while tr_and_split tr_and_split_redux tr_moar_magic end_of_substring 2899/s -- -20% -21% -23% -54% -63% -77% -77% -95% tr_and_end 3634/s 25% -- -1% -4% -42% -54% -72% -72% -94% end_slurped 3679/s 27% 1% -- -3% -41% -53% -71% -71% -94% all 3779/s 30% 4% 3% -- -40% -52% -70% -71% -94% split 6258/s 116% 72% 70% 66% -- -20% -51% -51% -90% while 7843/s 171% 116% 113% 108% 25% -- -39% -39% -87% tr_and_split 12788/s 341% 252% 248% 238% 104% 63% -- -0% -79% tr_and_split_redux 12837/s 343% 253% 249% 240% 105% 64% 0% -- -79% tr_moar_magic 60606/s 1990% 1568% 1547% 1504% 868% 673% 374% 372% -- #### $ perl5.12.5 foo Rate end_of_substring end_slurped tr_and_end all while split tr_and_split_redux tr_and_split tr_moar_magic end_of_substring 2596/s -- -18% -19% -21% -61% -77% -95% -96% -96% end_slurped 3185/s 23% -- -1% -3% -52% -72% -94% -95% -95% tr_and_end 3214/s 24% 1% -- -2% -52% -72% -94% -95% -95% all 3270/s 26% 3% 2% -- -51% -71% -94% -95% -95% while 6693/s 158% 110% 108% 105% -- -41% -87% -89% -89% split 11429/s 340% 259% 256% 249% 71% -- -78% -81% -82% tr_and_split_redux 52910/s 1938% 1561% 1546% 1518% 690% 363% -- -12% -15% tr_and_split 60241/s 2220% 1792% 1774% 1742% 800% 427% 14% -- -3% tr_moar_magic 62112/s 2293% 1850% 1832% 1799% 828% 443% 17% 3% -- #### $ tail -8 bar __DATA__ oevoerfgveoevervevoooooevevevoooevevevevoooor4tghew4rtghgwooorgeqrgferfgoooo refrorgoregerorrefM oorreoooooerferfgqerfgrt4hgetryhy5oooo erfewrfewrfertwgerwGoorefeqwrefrfewer rfeeorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrooorr rferrrrrrrrrrrrroooooooooooooooooooooooooooooooooooooooooooooooooooooorrrrr #### $ perl5.22.0 bar Rate while all split end_of_substring tr_and_match tr_and_end end_slurped tr_and_split_redux tr_moar_magic tr_and_split tr while 111111/s -- -4% -4% -6% -8% -13% -18% -23% -24% -26% -26% all 116279/s 5% -- 0% -1% -3% -9% -14% -20% -21% -22% -22% split 116279/s 5% 0% -- -1% -3% -9% -14% -20% -21% -22% -22% end_of_substring 117647/s 6% 1% 1% -- -2% -8% -13% -19% -20% -21% -21% tr_and_match 120482/s 8% 4% 4% 2% -- -6% -11% -17% -18% -19% -19% tr_and_end 128205/s 15% 10% 10% 9% 6% -- -5% -12% -13% -14% -14% end_slurped 135135/s 22% 16% 16% 15% 12% 5% -- -7% -8% -9% -9% tr_and_split_redux 144928/s 30% 25% 25% 23% 20% 13% 7% -- -1% -3% -3% tr_moar_magic 147059/s 32% 26% 26% 25% 22% 15% 9% 1% -- -1% -1% tr_and_split 149254/s 34% 28% 28% 27% 24% 16% 10% 3% 1% -- -0% tr 149254/s 34% 28% 28% 27% 24% 16% 10% 3% 1% 0% -- #### $ perl5.22.0 baz Rate end_of_substring tr_and_end end_slurped all while split tr_and_match tr_and_split_redux tr_and_split tr_moar_magic tr end_of_substring 19048/s -- -3% -4% -71% -74% -75% -75% -84% -86% -86% -87% tr_and_end 19608/s 3% -- -1% -70% -74% -74% -75% -84% -85% -86% -87% end_slurped 19881/s 4% 1% -- -70% -73% -74% -74% -83% -85% -86% -86% all 65359/s 243% 233% 229% -- -12% -14% -16% -45% -51% -53% -56% while 74627/s 292% 281% 275% 14% -- -2% -4% -37% -44% -46% -49% split 76336/s 301% 289% 284% 17% 2% -- -2% -36% -43% -45% -48% tr_and_match 77519/s 307% 295% 290% 19% 4% 2% -- -35% -42% -44% -47% tr_and_split_redux 119048/s 525% 507% 499% 82% 60% 56% 54% -- -11% -14% -19% tr_and_split 133333/s 600% 580% 571% 104% 79% 75% 72% 12% -- -4% -9% tr_moar_magic 138889/s 629% 608% 599% 112% 86% 82% 79% 17% 4% -- -6% tr 147059/s 672% 650% 640% 125% 97% 93% 90% 24% 10% 6% --