4 ms·
Supposedly es4x (powered by GraalVM) cracked the top-5 empower benchmarks, while no other Node/JS frameworks are in top-20/top-30 (iirc): https://www.youtube.c
by stephen 7y ago
Supposedly es4x (powered by GraalVM) cracked the top-5 empower benchmarks, while no other Node/JS frameworks are in top-20/top-30 (iirc):
https://www.youtube.com/watch?v=JUJ85k3aEg4 https://www.youtube.com/watch?v=JUJ85k3aEg4
The assertion in the ^ video (from the es4x author) is that node programs hop across the http/libuv/v8/etc. boundaries all the time, and that's the majority of the overhead, not actual business/program logic.
So, es4x sitting on graal brings all of those http/event loop/js runtime infra projects into a single optimizing VM.
My memory is ~fuzy on the details, but I believe I got our apollo server running running on es4x a few months back, and the latency was ~double node, which was still impressive IMO, but I didn't see the amazing gains that the author does. Not sure why.
- leeoniya 7y agothe author of [1] basically says the same thing. in terms of io/throughput you gotta side-step Node (but v8 itself is plenty fast). he's famous for trolling the Node & Deno repos (i think he's banned from both). he also refuses to participate in the benchmarks (despite being able to score very well) because he says their methodology is flawed. [1] https://github.com/uNetworking/uWebSockets.js/ https://github.com/uNetworking/uWebSockets.js/
- xenadu02 7y agoI integrated a really simple JS runtime into a C# project once and found the same thing. V8 was orders of magnitude slower due to the interop overhead. Even though the IronJS compiler was very simplistic it was just so much faster to do it inside the CLR and let the MSIL JIT optimize to the degree it was able. An example of “worse is better” I suppose.
- nine_k 7y agoI'd say it's an example of optimizing the right thing. Business code is relatively short and uncomplicated, compared to the interop code. So optimizing the slowest part (but not the most obvious part) gave good results. JS inside C# being faster than Node is great news!
- pjmlp 7y agoJust like Google did with their FloatMath class, after Dalvik got replaced by a proper JIT compiler. https://developer.android.com/reference/android/util/FloatMath https://developer.android.com/reference/android/util/FloatMa...
- kitd 7y agoAIUI, es4x essentially replaces Node with Eclipse Vert.x, so the main question for me is how it compares to running on a normal JVM. Do you have any figures there?
- pmlopes 7y agoIt does work on a stock openjdk11 with similar performance (but I don't have numbers to show). What happens in this case is that we can load the graal compiler to replace the default jit but it will not allow you to use other languages as only graaljs currently runs on this mode.
- pmlopes 7y agoHi, I'm the author of ES4X I'd love to check your graphql test. I've no experience on Apollo so if you could share a test/benchmark it would be great to see where the bottlenecks come from.