Just another Perl shrine | |
PerlMonks |
Re: performance of perl vs javaby repellent (Priest) |
on Oct 30, 2011 at 05:10 UTC ( [id://934681]=note: print w/replies, xml ) | Need Help?? |
Perl is a great language to learn, and I hope you'd remain around on PerlMonks to see the cool things you could do with it. It's usually fast enough, but more importantly, it's highly "optimized" for programmer effort such that you can get more done with minimal coding. Performance comparisons between two language implementations is hard to get right. You need to know the intricacies of both languages to avoid an apples vs oranges comparison. Here's a different Perl implementation that runs a lot faster on crappy hardware. Rehashing merlyn's article, I got the following code, which uses core Perl features only, to find all primes <= 3_000_000 (216816 total) in 9 secs:
This is run on FreeBSD vmware (256MB RAM) on an 8 year-old Athlon XP.
Update: Added preamble for OP.
In Section
Seekers of Perl Wisdom
|
|