Magnitus: More often than not, ecosystem factors outside of performance will dictate my choice.
For example, lately as a devops engineer, I've used golang a lot due to its first rate integration with Terraform and Etcd as well as its ability to compile into small self-contained binaries for command line utilities. The fact that golang is faster is a nice added bonus, but the primary factor here has been the quality of its integration with what I'm using and its runtime requirements (ie, none beyond a Linux os and adm64 cpu architecture).
My current personal project also is using languages based on ecosystem factors.
* Using the web browser for the GUI dictates the use of JavaScript for that.
* With JavaScript, I get to use MathJax, which is a library that converts embedded LaTeX in a webpage into nice mathematical notation.
* To actually generate the math formulas that appear, on the other hand, I need sympy, which is a Python library.
* Fortunately, there exists a package called pyodide, which is Python (3.10.2 in this case) compiled to WebAssembly; with this I can run Python code in the browser. (Drawback: It takes a while to load, but at least I can display some instructions while waiting.)
Other recent projects I've done include:
* One, written in Python, that runs on the text console, using the curses library. (Any programming language that supports curses could be used here, though Python also has arbitrary precision integers built in, which is what I used.)
* Another uses the Godot engine, and hence all the code for it is written in GDScript and GDSL. GDScript works well for writing game logic, but integers are limited to 64-bit integers (something that has come up), and given that I've been working with the self-imposed restriction of not using any assets, adding audio is going to require another language. (I use GDSL, a shader language, to draw some of the graphics.)
Of these, the only choices that've actually been dictated by performance are the use of GDSL (though also dictated by the choice of engine) and the need to use another language for audio creation.