3 ms·
The benchmark should be based on idiomatic code in both languages for a same (or similar) input -> output.
by elwell 6y ago
The benchmark should be based on idiomatic code in both languages for a same (or similar) input -> output.
- capableweb 6y agoYou could do that but then your comparison is obviously biased and not very useful.
- kangalioo 6y agoArguing that two programming languages must be considered to have the same performance just because they compile down to the same technology, is flawed. Otherwise you couldn't make performance comparisons between C, Rust, Go, Haskell, Julia, because they all compile to assembly
- capableweb 6y agoI'm not saying you can't, I'm saying that since the code that eventually gets executed the same way just one layer down, it's not useful to JUST consider the performance. You're not using TypeScript to get faster JS execution. You're using TypeScript to get types in JS. Compare development speed and avoiding bugs together with performance in that case. Same for Clio.
- spenczar5 6y agoOk, but I still want to know how much of a performance tax I am paying to know whether it’s the right tool for the job. If it’s a thousand times slower, maybe that overwhelms the benefits of extra features.
- Fellshard 6y agoAnd what if every statement I write in the upper language compiles down to one loop that runs a hundred times? The target language is a lower bound, not an upper bound.
- dandellion 6y agoPicking a language is very subjective, so that's exactly the kind of biased comparison that I want to judge something like this.