Languages are rarely "slow" or "fast" by themselves. Programs written in those languages can be slow or fast.
Languages are rarely "slow" or "fast" by themselves. Programs written in those languages can be slow or fast.
For sure they are, language features will for sure limit the optimizations a compiler/interpreter can do and for sure a language with many levels of abstractions will have to pay the price in performance somewhere.
Every-time someone improves the benchmark performance of a slow language that person is not a regular developer, but someone that has a deeper understanding on what happens under the hood, knows how to use profiling tools, maybe knows assembly and most of the time they have to use tricks or advanced patterns.
Btw, optimizing some slow language in a hot path with clever tricks or some advanced patterns is fine, it happens all the time, you can;t just switch the project language with 1 click.
For example:
Common Lisp has a full numerical tower, meaning it will automatically convert fixed size numbers into bignums (and more cool stuff). This means that an addition has to branch if it can't prove that a result won't overflow from fixnum to bignum. Yes, C also needs to use bignums, but they're on an opt-in basis. In CL they're opt-out.
There are more examples of this, often related to the dynamism of your language. The more introspection a language is capable of, the less a compiler designer can do to cheat and optimize your program.
https://european-lisp-symposium.org/static/proceedings/2021....
(the last paper, by Robert Strandh.)
Common Lisp is interesting in that it is high-level while lots of implementations (like sbcl) also retaining the ability to drop into lower levels (even assembly) if lots of performance is needed.