On Wed, 1 Jun 2016 20:25:39 +0200
David Emanuel da Costa Santiago <deman...@gmail.com> wrote:

> Hi!
> 
> I have a script that writes to a socket, but i noticed that the same
> script have diferent speeds on different machines. It's faster on my
> 5 year laptop than on my desktop.
> 
> I profiled the script on both machines and some functions are taking
> almost the double of the time! Example:
> 
> on my laptop:
> 
> Calls: 10631
> Exclusive Time: 28.2s
> Inclusive Time: 28.2s
> Subroutine: Net::SSLeay::write_partial (xsub)
> 
> On my desktop:
> Calls: 5057
> Exclusive Time: 45.0s
> Inclusive Time: 45.0s
> Subroutine: Net::SSLeay::write_partial (xsub)
> 
> 
> Both machines have the same software version (OS, perl,..) and the
> internet connection is the same. The hardware is different.
> 
> What puzzles me is that my desktop have better hardware (according
> to the benchmarks on the internet) than my old laptop. However i get way
> worse speeds on my desktop.
> 
> On both machines, when the script is running the CPU is around 7%, and
> the RAM usage is between 50MB - 100MB.
> 
> The question for one million dollar is "Why?". And how can i improve
> the performance of my desktop to reach the same speed as my laptop
> (considering that i have better hardware on my desktop)? If i recompile
> perl instead of using a binary package, will that make it even?
> 

It may make it a little better, but it should work better on the newer machine
as it is. You can try using https://metacpan.org/pod/Devel::NYTProf to see what
consumes the most time on the slower-to-run-it machine and see if  you've
missed something.

Regards,

        Shlomi Fish

> 
> 
> Regards,
> David Santiago
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
List of Networking Clients - http://shlom.in/net-clients

Alan: Hello, Miss Mandrake. I’m Alan. [she shakes his hand.]
John: John. [shakes his hand.]
Alan: We’re mighty vampires.
Selina: [Amusingly] Selina Mandrake, mighty pirate.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to