in reply to Re^3: Counting the number of items returned by split without using a named array
in thread Counting the number of items returned by split without using a named array
$ cat a.pl; echo '-----------' ;echo;./a.pl #!/usr/local/bin/perl -w use Benchmark qw(:all) ; our $s = join ' ', 'aa'..'zz';; cmpthese( -3, { split => q[ $_=$s; my $n = @{[ split ]}; ], regex => q[ $_=$s; my $n = () = /\S+/g; ] }); ----------- Rate regex split regex 981/s -- -53% split 2098/s 114% --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Counting the number of items returned by split without using a named array
by BrowserUk (Patriarch) on May 03, 2006 at 16:34 UTC | |
by Anonymous Monk on May 03, 2006 at 17:32 UTC | |
|
Re^5: Counting the number of items returned by split without using a named array
by Anonymous Monk on May 03, 2006 at 15:20 UTC |