RE: Want to reduce the speed of execution in Perl script.

2006-04-06 Thread Yekhande, Seema \(MLITS\)
In this below example, I want to transfer the output of one file to the other file for reading and then take the average of every column. Do you have any idea about why column_average function doesn't works when multiple files Are passed using the for routine? #!/usr/bin/perl -w use fileoprn

RE: Want to reduce the speed of execution in Perl script.

2006-04-06 Thread Thomas, Mark - BLS CTR
Yekhande, Seema (MLITS) wrote: Do you have any idea about why column_average function doesn't works when multiple files Are passed using the for routine? ... sub column_average { my ($idx) = @_; my $sum = sum map {$_-[$idx] if defined $_-[$idx]} @data; return $sum; } This

RE: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Peter Eisengrein
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,

RE: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Yekhande, Seema \(MLITS\)
Actually Regex is taking more time instead of agrep. That's why the idea of using either agrep or find. 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

RE: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Nelson R. Pardee
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

RE: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Thomas, Mark - BLS CTR
Actually Regex is taking more time instead of agrep. That's why the idea of using either agrep or find. 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. This has a chance of being

RE: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Peter Eisengrein
Actually Regex is taking more time instead of agrep. That's why the idea of using either agrep or find. 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. I don't have agrep but since

Re: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Lyle Kopnicky
Yekhande, Seema (MLITS) wrote: Does anyone is having different idea about reducing the speed in execution? This I am finding out about how to reduce the speed. You can reduce the speed by: 1) running on a slower machine, 2) running other compute-intensive programs at the same time, or 3)

Re: Want to reduce the speed of execution in Perl script.

2006-04-05 Thread Chris Wagner
U had me confused. I thought u wanted to make this run slower because it was bogging down ur computer or something. But based on ur script comments and other posts it seems u want to make it run faster. So u want to reduce the time of execution not the speed of execution. At 05:18 PM 4/5/2006