3 ms·
>Not just this, but the ceiling of performance improvements matter a lot too. But the floor can matter too. For someone trained to write high-performance JavaS
by crazypython 6y ago
>Not just this, but the ceiling of performance improvements matter a lot too.
But the floor can matter too. For someone trained to write high-performance JavaScript, JavaScript's performance floor is higher than Rust's, and they can write more JavaScript faster.
> A good example of this limit is something like the TypeScript compiler. It has huge performance issues with larger codebases, but unfortunately there's not much that can be done without rewriting the entire damn thing in e.g. Rust, because you've reached the limits of JavaScript.
Actually, you can fix it by rewriting it as a single-pass compiler to improve the algorithms.
- Tehnix 6y ago>But the floor can matter too. For someone trained to write high-performance JavaScript, JavaScript's performance floor is higher than Rust's, and they can write more JavaScript faster. I'm not sure what you mean by the floor here? Experience? The author of the article was experienced in JavaScript and was new to Rust for example. >Actually, you can fix it by rewriting it as a single-pass compiler to improve the algorithms. I'd say that's on the same scale of work as rewriting it in a new language. And even then, this is most likely not a realistic solution, I can almost guarantee you there will be stuff they are currently doing that they cannot do in such an architecture. The first problem with the words "single-pass" and "Javascript" that come to mind are the out-of-order variable declarations, i.e. var, which bubbles up. There are a ton of other issues as well.