3 ms·
What isn't it good compared to? You said it's good compared to python and I don't think it's fair to compare it to compiled languages like go, C, C++, Rust. In
by SahAssar 6y ago
What isn't it good compared to? You said it's good compared to python and I don't think it's fair to compare it to compiled languages like go, C, C++, Rust. In techempower[1] benchmarks node usually falls somewhere in the middle, and es4x (claimed to be the fastest js runtime) is usually in the top 50, and an overall place of #9. Benchmarksgame[2] also seems pretty okay to me.
[1] https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=query https://www.techempower.com/benchmarks/#section=data-r19&hw=...
[2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/javascript.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- chank 6y agoIt's entirely fair to compare Node to compiled languages. People often choose between it and those languages for backend code. The reason they choose Node most of the time is simply because they want to use the language across the stack not because performance is a top priority.
- tgv 6y agoJava (from the benchmarks page) can be quite a resource hog too, but those benchmarks are hardly relevant to servers. ES4X is written in Java, BTW. I think it's totally fair to compare node/js at least to Go. Go is quite simple: it's a GC language, almost without pitfalls except for nil and not error checking type conversions. It's really not unlike JavaScript in many aspects. Also: node's performance is ok when passing small amounts of data per request. It's when you use it to serve files (images, videos in particular) or larger data tables that it loses steam. And it will take quite a bit of memory, though, unless you start optimizing. Node is one of those environments that makes it easy to start a project, but difficult to bring it to fruition.
- SahAssar 6y ago> It's when you use it to serve files (images, videos in particular) or larger data tables that it loses steam. Pretty much every guide/tutorial/documentation says to not use node for this. Isn't this the same for a lot of languages like php, python, ruby, etc? Those all usually run behind a reverse proxy that handles file serving.