If it was just a matter of parallelism V non-parallelism, that would be 1 issue.
But the 2nd big issue: Look at the total cpu time used:
From the above, stated as percentages or multipliers, perl is 478% more efficient in making use of multicore resources.lang #thrds #cores_used %efficency clocktime cputime(Usr+Sy +s) python 9 1.82 20.2% 67.35s 122.53s perl 9 8.70 96.7% 3.36s 29.23
In real time, python takes 64 seconds longer over the base time that was needed, of 3.36s. Python is 1900% SLOWER.
Someone mentioned python might not be optimal in parallelism due to threading problems.
So look at the actual amount of CPUtime used for each to do the work.
122.53/29.23. For heavy number crunching, perl (with max precision
possible in x86-64 HW, takes less than 1/4th the time, i.e. perl
is 4.2x the speed of python.
----
(Notes collected for a response to the "said" note writer...)
In reply to Re^3: parallelism v.python
by perl-diddler
in thread parallelism v.python
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |