Re:Why Did I Choose Perl When Building Crowdtilt?
by uvtc on Saturday September 01, 2012 @12:14PM
(#4464125)
Perl 5 has been around for a while and has seen quite a bit of optimization. It's fast.
Re:Why Did I Choose Perl When Building Crowdtilt?
by singingfish on Saturday September 01, 2012 @09:44PM
(#4465846)
And the regex engine is amazingly fast (there is one faster I believe). Try throwing a 20,000 item list at this little program, and then use the resulting regex to match another 20,000 items and see how long it runs (hint: not very, considering):
#!/usr/bin/env perl
use warnings;
use strict;
use Regexp::Assemble;
my $ra = Regexp::Assemble->new;
while (<>) {
chomp;
$ra->add($_);
}
print $ra->re . "\n";
Re:Why Did I Choose Perl When Building Crowdtilt?
by singingfish on Monday September 03, 2012 @07:26AM
(#4469996)
Well I'm told that newer versions of perl optimise alternations internally and this is redundant now:
my $re = join "|", @list;
my (@matches) = $txt =~ /$re/g;
Quicker and faster...
What with all the fancy compiler/interpreter technology going into things like V8, Nitro, pypy, cpy, etc, would be interesting to see how perl is keeping up in terms of speed.