Proposal for How to Talk About “Which Language is Faster”

As I don my flame retardant suit…


Just a quick hit thought on this one. How many times have we seen this discussion play out on the internet:

Person A: Which of these programming languages is faster?

Person B: Neither is really “faster”. The quality of the implementation is orders of magnitude more important than the language.

Person A: OK, but assuming the same quality of implementation, which is faster?

Person B: *sigh* Well in that case…

I present that example with no shade thrown at either side of the discussion. I’ve been, and likely will be, both of those people.

I completely empathize with Person A. There are times when it’s a valid question to ask, especially at the beginning of a project or when deciding what you want to learn about next. Also, sometimes we’re just ignorant.

I also completely empathize with Person B. While many people asking the question already know that implementation matters much more, it’s still important to point it out for the cases when the asker doesn’t already know.

I see this as a failure of language rather than a failure of either person. Any time it’s common that one person needs to add some kind of “you know what I mean” appeal, there’s probably a better way to state it.1

I propose that we change the discussion to be about which language has more performance headroom. This has two main advantages.

  1. The idea of performance headroom bakes in the idea that implementation matters. It may or may not be fast, but it does (or does not) have the headroom.
  2. Performance headroom is a much more concrete concept than quality of implementation. There is probably a correct answers to which programming language has the fastest best-possible implementation of a program. It may be prohibitively complex to ever find or prove that, but it at least exists. Good luck concretely defining, let alone proving, “quality of implementation”.

With this language, the conversation above turns into the following:

Person A: Which of these programming languages is faster?

Person B: The first one has more headroom when used well.

That seems like a much better conversation


  1. Especially for us engineers and our high propensity for low context language. โ†ฉ๏ธŽ

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *