开发者

What is 'Language Performance'?

I'm reading a presentation in which different programming languages are being compared. And one of charact开发者_开发知识库eristics which is measured is 'Language Performance'. What does it mean?


The real answer: it means nothing, or whatever the author of that presentation was thinking about at the time.

Maybe it means "how much time it takes to perform actions with the same semantics relative to other languages"? But who can say?


I would define language performance as meaning the performance of the best existing implementations of a language when provided with typical, idiomatic implementations of algorithms.

Some languages are much easier to write efficient implementations of than others. C, for example, has basically always been a "fast" language because it's very close to the metal and easy to write an efficient compiler for. As performance is technically a property of the implementation, a slow language can become a fast language as implementations improve. Java, for example, was interpreted in its early versions and was considered (rightly at the time) to be a "slow" language. Since then, the JIT compilers and garbage collectors have gotten so good that Java now rightfully deserves a place among "fast" languages. This illustrates why such comparisons of language performance need to be taken with a grain of salt.


This is a loaded question and is definitely up for interpretation. If this is a high quality paper, it should should specify exactly how they measured it so the reader can make their own judgment on the validity of the numbers. How I would measure it though is:

I would create/find a series of programs that do exactly the same thing and can be written in very close to the same way in every language. It's possible there already exists a suite of software (a la SPEC cpu2006) that does exactly that. After finding these programs, I'd run them and measure the performance. Here, it's still hard to draw conclusions, as different languages (and/or runtimes) do different things better and worse, and it's very difficult to find a set of programs that "correctly" exercise all parts of the studied languages.


Usually it means that the author prefers one of the languages being discussed, and is attempting to convince you that his preference is valid and based on solid facts rather than personal taste (or, arguably, lack thereof).


It's not, as far as I know, a term with a universally acknowledged definition. In fact. "Language Performance" probably means "some metric for which my favorite language has a good score". More seriously, the presentation should define the terms. If this term isn't defined in a comprehensible fashion, then the presentation lacks substance.


Some languages require large runtime environments in order to run properly, this mainly applies to interpreted languages like Python or Ruby. Many compiled languages have smaller runtime overhead, like Objective-C. These factors contribute to performance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜