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.


Figure 1: Perl vs C


Figure 2: Ruby vs C


Figure 3: Python3 vs C


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.


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 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.


The cool thing about 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.


Figure 6: Perl popularity on

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”.


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.,,,,,,, and 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:

High traffic Perl web sites


Figure 8: Alexa rating


Figure 9: Alexa rating


Figure 10: Alexa rating


Figure 11: BBC iPlayer Alexa rating

How Emacs inspired Matz in creating Ruby

Matz (Yukihiro Matsumoto) and Richard Stallman
Matz (Yukihiro Matsumoto) and Richard Stallman
I just found this 2013 article about two of my favorite things, Emacs and Ruby, on the fabulously opinionated site. When Yukihiro Matsumoto created Ruby in 1993, he was already a confirmed Emacs user and Emacs Lisp hacker. Matz explains in his 2012 LibrePlanet Conference presentation (slideshow) that his knowledge of the Emacs source code influenced his design of Ruby’s core features. Checkout the links below to get the whole story.


The Missing Figures for Programming Ruby, First edition

Programming Ruby, The Pragmatic Programmer’s Guide, First Edition (free) is one of my favorite Ruby learning books. Paired with Peter Cooper’s Beginning Ruby: From Novice to Professional, it’s a great resource for learning Ruby.

One thing missing from the online version of the book are the some of the figures that show how Ruby’s classes and meta classes work. Luckily I found these images online a few years ago. The image names are named according to their chapters. Enjoy. 🙂

Figure 19 from Programming Ruby, First ed
Figure 19 from Programming Ruby, First ed
Figure 19_2 from Programming Ruby, First ed
Figure 19_2 from Programming Ruby, First ed
Figure24_1 from Programming Ruby, First ed
Figure24_1 from Programming Ruby, First ed
Figure24_2 from Programming Ruby, First ed
Figure24_2 from Programming Ruby, First ed
Figure24_3 from Programming Ruby, First ed
Figure24_3 from Programming Ruby, First ed
Figure24_4 from Programming Ruby, First ed
Figure24_4 from Programming Ruby, First ed

Drupal 8 is seven times bigger than Drupal 7

Drupal 8 has arrived, and it’s big, very BIG. I thought it would be fun to measure exactly how big and compare it to some of the other PHP-based frameworks we know and love. I’ll use Drupal 7 as the baseline.

Table 1: Drupal’s expanding code base
Framework Lines of Code
Drupal 6 21,417 (25%)
Drupal 7 86,686 (100%)
Drupal 8 606,382 (699%)

For comparison, here are a couple of popular non-Drupal packages

Table 2: Moodle is still the Big Kahuna of PHP projects
Framework Lines of Code
WordPress 144,850 (167%)
Drupal 8 606,382 (699%)
Moodle 3 1,170,358 (1,350%)


Relative sizes

Drupal 6

Drupal 7


Drupal 8

Moodle 3

My line counts were made by downloading the lastest versions of Drupal 6, 7, 8, WordPress, and Moodle, then counting the lines with Sloccount. Sloccount is a marvelous way to total up  millions of lines of source code.