3 ms·
It's a really interesting and important question though; Do you measure a languages "performance" 1. by how fast it runs when written by a very experienced dev
by lionkor 6y ago
It's a really interesting and important question though; Do you measure a languages "performance"
1. by how fast it runs when written by a very experienced developer, or
2. by how fast programs run that are written by the "average" programmer, or
3. by how fast it runs when written by a bad or inexprienced programmer?
For each of these I can think of (at least) one language that would beat the performance of any other. There are languages that are "very difficult to use wrong", and there are languages that are difficult to use right. For the latter, C++ is a great example. You will copy and leak yourself out of memory before you terminate, if you dont know what you're doing.
Maybe we should stop comparing random languages from different domains by how fast they run.
- josephg 6y agoMy first take at an answer is, what sort of code do I anticipate writing in each language? And what sort of code do I expect to see from my peers? Rust makes it surprisingly easy to write code that absolutely thrashes the memory allocator - using String/Box/Vec and adding .clone() everywhere makes a lot of tricky borrowing problems go away. Is that the kind of code I expect to be writing? Or running? And if so, we shouldn’t expect that kind of code to perform much better in most cases than javascript.
- farresito 6y agoYou measure it of course by how fast it runs when written by a very experienced developer. I don't see how you can argue any other way.
- EwanToo 6y agoYou're absolutely right, these are the kinds of questions any team should be asking * Is language X that we all know suitable?" * Is there a language Y that we could all learn in an acceptable time optimal? * What does the tooling look like? * How would we bring in new people? CPU runtime is just one aspect to consider