Peter's website random notes

This is a guest post by Karl Holt

Based on a recent discussion about the fastest computer languages I was encouraged to create my own list by PMikkelsen.

How to measure a language's speed?

This is the essence of the discussion and looking at the lists on search engines they all seem to disagree on this point. However most list I've been able to find puts C as number 1 and C++ as number 2. The rest of the lists seems to vary a bit more. This seems a bit weird however, since there is a lot of Turing Complete languages that should outperform these, such as Assembly code. But okay, let's say we only want "high level" languages, then the again it all comes down to the implementation. How efficiently are the programmer thinking about the low level computer architecture. And so on, and so on…. That is why I've choosen to base my list of fastest languages on how fast I personal could make a computer output "Hello World!". This is not a complete list of languages, and only contains the once I want. So take that into consideration.

The list:

  1. Prolog I have a prolog terminal open at the moment, so it be very quick to print it out.
  2. C I've a program which I debugged by writing "Hello World!" at appropriate places in the file to see which part of the program ran, therefore this is only on command away, here I would also get atleast 5X"Hello World!" so, yes, very fast!
  3. Python I can very quick close my Prolog terminal and start Python, also renmeber the sytax for this so it should be quick.
  4. APL I can see PMikkelsen is online so I would just ask him for the appropriate code. And I've earlier installed Dyalog on my computer, so I'd say the bottleneck here is how fast PMikkesen takes to answer.
  5. SQL I guess I could create a table and populate it with the element "Hello World!", and then ask for the element witd id 42.
  6. Javascript I've my browser open next to me, but first I would have to make my peace with that I was about to write JS, takes a bit of time.
  7. Haskell I've never written Haskell but I don't think it would take so long.
  8. Rust I don't think I would ever complete this, I really don't like the sytax of Rust, so no thanks
  9. Runoff The language doesn't have strings or chars, so literally impossible.
  10. C# I will never touch that language again.