Perl FAQ: How fast is Perl and other trivia

Perl Trivia FAQ

The most common questions I get about Perl are:

  1. How fast is Perl?
  2. How popular is Perl?
  3. Who uses Perl?
  4. Can Perl scale up?

You can detect the underlying question in all of these: Should I invest my time into learning Perl?

How fast is Perl?

The short answer is that Perl is just as fast as other scripting langauges. This also means that Perl is also just as slow as other interpreted scripting languages when compared to C.

perl_vs_c.jpg

Figure 1: Perl vs C

ruby_vs_c.jpg

Figure 2: Ruby vs C

python3_vs_c.jpg

Figure 3: Python3 vs C

php_vs_c.jpg

Figure 4: PHP vs C

The differences in speed between interpreted languages like Perl, Python, etc. is insignificant. In projects where RAD (Rapid Application Development) and Agile programming is used, interpreted languages have several advantages.

  1. Rapid prototyping, no write/compile/run cycle.
  2. RAD allows more iterations per hour of expensive Agile developer time.
  3. Cross-platform

What about Java?

For comparison, I thought I’d include Java vs C. You can see that Java is about half as fast as C, and about 30 times faster than Perl/Python/etc.

java_vs_c.jpg

Figure 5: For comparison, Java vs C

The moral of all of these graphs is clear: if you need speed, you need C or another compiled language. Otherwise, any language you use will probably be fast enough for almost any task. fter all, Facebook was built on a scripting language — PHP. Twitter was built with Ruby. Craigslist and Booking.com are doing just fine with Perl. Perhaps the speed of the language you use really isn’t as important as having a good idea in the first place.

How popular is Perl?

Measuring popularity of a language is a hazardous undertaking. Do we mean which language has the most job listings (C)? Or which language has the most churn for Github open source projects (Objective-C)? Or which language has the most discoverable files on the Web (PHP)? Which language is most popular for web sites (PHP)? Which language has the largest pool of programmers (Java)? Which language runs on the most computers (JavaScript)? Which language will lead to the highest pay (Rails)? Does it even matter if a language is popular (maybe)?

You can decide for yourself by looking at the unscientific resources below whether Perl is popular.

The Tiobe IndexOne

One common measure of language popularity is the Tiobe Index, where Perl has been in the top 10 list for about 20 years. On this index, C/C++ and Java usually garner 40+% of the ratings, while the the remainder of the Top Ten range from 2% to 4%. In this list Perl is currently more “popular” than many other so-called popular languages, including Visual Basic, Ruby, Assembly, F#, and R.

Langpop

The cool thing about http://Langpop.com is that it’s a compilation of many different sources of data— Google searches, Github repo activity, Craigslist job postings, academic discussions of Lambda The Ultimate, Reddit, etc. On Langpop Perl is among the top 15 programming languages when all sources are compiled.

perl_popularity_langpop.jpg

Figure 6: Perl popularity on Langpop.com

IEEE Spectrum

The IEEE Spectrum rating is based on data taken from Twitter, GitHub, Stack Overflow, Reddit, Hacker News, Career Builder, Dice, and IEEE Xplore Digital Library. You can filter search results by language types: Web, Mobile, Enterprise, and Embedded. Here’s the current data (Aug, 2015) filtered by the term “Web”.

iee_spectrum_by_web.jpg

Who uses Perl?

Perl has been around for almost 40 years and is used almost everywhere in government, financial services, information technology, retail, communications, mixed services, energy resources and manufacturing, and education. The list quite enormous Here’s a list

Can Perl Scale Up?

Yes. http:Craigslist.org, http://Booking.com, http://Priceline.com, http://IMDb.com, http://LiveJournal.com,
http://Slashdot.org, http://Ticketmaster.com, and http://Duckduckgo.com are all big Perl web sites. On the seamy underbelly of the Web, Perl has been a big player in the world of adult web sites — Youporn and adultfriendfinder are two high-traffic examples.

More Perl users: http://perltraining.com.au/whyperl.html#who

High traffic Perl web sites

craigslist_alexa.jpg

Figure 8: Craigslist.org Alexa rating

booking.com_alexa.jpg

Figure 9: Booking.com Alexa rating

duckduckgo_alexa.jpg

Figure 10: Duckduckgo.com Alexa rating

bbc_iplayer_alexa.jpg

Figure 11: BBC iPlayer Alexa rating