Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Large scale search and replace with perl -i

by Abigail-II (Bishop)
on Apr 14, 2003 at 20:44 UTC ( [id://250412]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Large scale search and replace with perl -i
in thread Large scale search and replace with perl -i

But with the use of xargs, there won't be many spawnings of perl. Furthermore, given that the number of files was supposed to be large, I'd expect the entire process to be IO bound. Finally, yeah, process creation is a fairly expensive operation, but so is calling a function in Perl. And that function will be called for each file in the directory tree, as compared to calling a perl instance for every couple of hundred files matching the criteria.

Convince me with benchmarks.

Abigail

  • Comment on Re: Large scale search and replace with perl -i

Replies are listed 'Best First'.
Re^2: Large scale search and replace with perl -i
by Aristotle (Chancellor) on Apr 14, 2003 at 21:04 UTC
    process creation is a fairly expensive operation, but so is calling a function in Perl
    Of course, these two are worlds apart in expense. (I'm not disagreeing with the rest of the sentiment here, though.)

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found