in reply to A question of efficiency

Well, there is more than one way, but as for speed, everytime system() is called a new process is created. This means the Kernel needs to allocate memory, load the executable, open file descriptiors, add the process to the internal scheduler and a slew of other things related to process creation. This all takes time. So, using system() when not needed, i have found, inflicts a hefty penalty. The best test is, as always, the ever present use Benchmark;. I would put them in and give it a whirl ... i am guessing the Pure-Perl version will be faster ... not to even get into the subject of portability, as that would turn into a huge rant :-)
OH, a sarcasm detector, that’s really useful

Replies are listed 'Best First'.
Re: Re: A question of efficiency
by nysus (Parson) on Jul 18, 2001 at 18:32 UTC