2 ms·
In line with my experience as a Java 8 NIO and latest node user, node basically performs identically to the best Netty implementation in IO-bound tasks. That pa
by doctorpangloss 10y ago
In line with my experience as a Java 8 NIO and latest node user, node basically performs identically to the best Netty implementation in IO-bound tasks. That parity could be attributed to relentless optimization of a fundamentally pretty straightforward problem in V8 that finally made it to the latest node.
My experience matches the TechEmpower benchmarks, which you should check out here: https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/ . They didn't get much discussion when posted.
- nrjdhsbsid 10y agoFortunes is not IO bound. Plaintext bench definitely is and node is around 8x slower than the fastest frameworks. Node is nowhere near raw netty performance in most situations and will never be. Js is single threaded, dynamically typed, and doesn't have low enough level access to the OS. Netty has a native network IO interface on linux. Node is pretty respectable but netty is basically the fastest thing there is unless you're doing C. It even uses native zero copy buffers with the ByteBuf implementation, something js doesn't (and cannot) do with its dynamic typing. The JVM has had a much longer period of relentless optimization and the language was designed to be well optimized. Js will never escape the performance penalty of dynamic typing and other decisions without a rewrite