> 
> 
> hi all,
> i want to know if i 'use somemodule' in  a perl program  how 
> does it affect the performance (in terms of being fast) of 

Well that depends on lots of things.

Generally modules are the best way to go as they are portable and great speedwise for 
various reasons.

Now actually timing it is different.

Does the module have 100,000 lines of code or 10?
How many lines would it take you to do the same thing in your script?
Plus what is fast on one server may be slow or incompatable on another, 
unless you had used a module that works the same on any server 

Foreaxmple you may save a couple milliseconds doing this

@lines = `cat /home/joemama/file.txt`;

But what happens when you go to a windows server ( lets hope it never comes to that ;P 
)with that. It dies.

Or you could do 

use File::Slurp;
@lines = read_file("/home/joemam/file.txt";

There are tests you can do. I'd say go to serach.cpan.org and search for Benchmark.
I think you'll find lots of great tools

Dan
 
> the script ? basically i want to compare the executable speed 
> of the program with and without using the module. thanks, KM
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to