On Wed, 5 Apr 2006, Yekhande, Seema (MLITS) wrote: > Actually Regex is taking more time instead of agrep. That's why the idea > of using either agrep or find.
What's the difference? Several times? Twice? A bit? I haven't been paying attention, so pardon if I missed something. For each invocation of the script, are you executing the expression only a few times, or a lot? If it's multiple times, does the search expression change or is it the same- can you use the /o quantifier to avoid recompiling it? How about Perl's grep? > This is small input.txt which I am using it as a input file. > If there is any other way of increasing the speed of same Perl script, > it is really required. > > Thanks, > Seema. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Peter Eisengrein > Sent: Wednesday, April 05, 2006 6:35 PM > To: Yekhande, Seema (MLITS); perl-win32-users@listserv.ActiveState.com > Subject: RE: Want to reduce the speed of execution in Perl script. > > > > > > system(qq~agrep "$fir\t$sec\t" $outfile > tmp~); ## agrep is an > external > > utility to find search pattern in a file and transfer it into other > file. > > > system(qq~agrep "$thr" tmp > tmp1~); ## agrep is more faster than > regular > > expression. > > Are two system calls to agrep really faster than a single, well-crafted > regex? This would be the first thing I'd look at to speed performance. --Nelson R. Pardee, Support Analyst, Information Technology & Services-- --Syracuse University, 211 Machinery Hall, Syracuse, NY 13244-1260 -- --(315) 443-1079 [EMAIL PROTECTED] -- _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs