Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl regexp matching is slow??

by Anonymous Monk
on Jul 11, 2008 at 21:41 UTC ( [id://697099]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        for loop over records from metadata table {
        slurp $docid.txt (from pdftotext) into $contents;
    ...
            print "$textfile didn't contain $s\n";
        }
        }
    
  2. or download this
        my @s = split(/\W+/, $s);
        foreach $word (@s){
    ...
            }
        }
        print "pos = ", pos $contents, ",$s|" unless $nomatch;
    
  3. or download this
    real    0m0.150s
    user    0m0.044s
    sys    0m0.068s
    
  4. or download this
    time tr -d '\n' < 250234.txt | egrep 'the...pattern'
    real    0m7.178s
    ...
    real    0m0.027s
    user    0m0.012s
    sys    0m0.008s
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://697099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found