in reply to Re^3: How to optimize a regex on a large file read line by line ?
in thread How to optimize a regex on a large file read line by line ?
Mac OS X 10.9.5, Intel Core i7 2.4 GHz, 16 GB RAM 1600 MHz DDR3$ time ./script.pl dict.txt Num. Line : 185866729 - Occ : 14900 real 0m39.453s user 0m38.999s sys 0m0.445s $ perl -v This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-th +read-multi-2level (with 3 registered patches, see perl -V for more detail)
You can shove some time off getting rid of $counter and using $. instead, a quick test took about 6 seconds less in my configuration.
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
Io ho capito... ma tu che hai detto?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to optimize a regex on a large file read line by line ?
by John FENDER (Acolyte) on Apr 16, 2016 at 18:03 UTC | |
by polettix (Vicar) on Apr 16, 2016 at 20:53 UTC | |
by John FENDER (Acolyte) on Apr 16, 2016 at 21:52 UTC |