From: "Uri Guttman" <u...@stemsystems.com>>>>>>> "OR" == Octavian Rasnita
<orasn...@gmail.com> writes:
OR> Perl compiles to bytecode but it doesn't save the compiled file,
OR> so in non-persistent programs like FastCGI or mod_perl the
OR> programs must be compiled again and again. Python saves the
OR> compiled bytecode of its modules automaticly and if the next time
OR> the program runs, the compiled bytecode is ran without needing to
OR> compile the code again.
so? that is only startup time and in any daemon/server situation it
doesn't matter. runtime matters then and saved bytecode doesn't affect
that.
Yes, but as I have said, this happends only in persistent environments, but
not all the programs run that way.
OR> Python may not be faster than Perl in all cases, but here are 2
simple
OR> programs that can be compared (I haven't added use strict...):
OR> In Perl:
OR> print fib(35);
OR> sub fib {
OR> my $n = shift;
OR> return $n if $n < 2;
OR> fib($n-1) + fib($n-2);
OR> }
OR> In Python:
OR> def fib(n):
OR> if n < 2: return n
OR> return fib(n-1) + fib(n-2)
OR> print fib(35)
OR> The compilation of this small program doesn't take too much anyway,
OR> but on my computer the Perl code above runs ~ 14 seconds and the
OR> Python code runs ~ 7 seconds which is a big difference.
so? that is a lousy example with a very small sample size. also
recursion is not a good way to benchmark languages.
Lousy lousy, but Python is faster and some programs might need recursion so
it is important which runs the same code faster.
I have already said that not all similar programs made in Perl are surely
slower, but this was just an example that shows that yes, Python can be
faster in some cases.
OR> Yes I know that we can use Memoize to speed it up but this is an
OR> optimization that can be made to the Python code too.
memoize on fibbinacci?? hahah.
Yes. I have taken that Fibonacci subroutine exactly from Memoize's POD.
OR> I doubt that most of the software companies that may offer employment
OR> opportunities know that Amazon uses Perl. But it is obviously that
OR> Google uses Python because w can see the .py extension on his web
OR> sites.
huh?? amazon offers employment opportunties and so does imdb (which is
all perl!).
Amazon doesn't offer employment opportunities in all the countries of the
world. It should have been just an example to other software companies that
might be interested in Perl because they see that it is used very much.
OR> With other words, I think that Perl is better than Python for web
OR> programming and system administration and Python is better for
>> desktop
OR> apps and for newer technologies.
>>
>> again, bogus logic.
OR> Why? I have told you why Python is better for. Do you think that Perl
OR> has only advantages and absolutely no disadvantage?
no. but your arguments have little to back them. this is a useless
thread and i am out.
I have given you a lot of arguments but remember, not everyone lives in a
country where there are already many Perl projects to maintain and where
many companies know that Perl is good. Because Perl is very good, but it has
a very bad image and this is another disadvantage.
OR> It has to do because in my country almost nobody uses Perl. There are
OR> just a few companies that use Perl, but most of them do outsourcing
OR> for other companies from USA, Western Europe and Australia.
OR> And a language which is the best but not required on the labour
market
OR> has very small value because the programmers usually need to live
with
OR> the money they earn.
move to a better country?
I can't do it because I have some health problems.
get a telecommute job?
All the companies from USA and UK that offer jobs as a Perl programmer
require to be USA/UK resident and to have work permit. I haven't seen any
offer for telecommute job. Maybe only those on some sites like vworker (ex
rentacoder) for just a few bucks.
OR> And there is no bias here because I like much more Perl and I know it
OR> much better and it is better than Python for creating web apps as I
OR> said, but it is not the best for everything.
perl isn't good to replace assembler, drivers and kernels. not much else
it can't do if coded well. too much code in general sucks.
Agree but it is used less and less and Python and Ruby more and more and it
doesn't matter how good it is if a job is hard to find and if... as you
recommended, you need to move in another country to get a job.
If you already have a stable job as a Perl programmer, or if you are living
in a rich country, you are biased because in that case yes, Perl doesn't hae
so many disadvantages.
But for a person that is living in a poor country where almost nobody uses
Perl... it doesn't matter if that person likes Perl more than other
languages, it doesn't matter that Perl is better, because he might find that
other languages have the advantage that are needed on the labour market,
while for Perl is not the case.
Octavian
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/