In the WinterJS announcement a few days ago there was some public skepticism on what we meant by blazing fast. This kind of terminology is mostly used for marketing proposes, so it’s completely understandable to be skeptic when no proof was provided.
But when we said blazing fast we were not joking… WinterJS is able to handle 100,000 reqs/sec in a single laptop without breaking a sweat.
In this article we will analyze WinterJS vs the alternatives: workerd and miniflare (check reproducible benchmarks). We would love to compare it with other WinterCG implementations, but unfortunately there aren’t many viable open-source alternatives.
Running a simple Service Worker server with WinterJS (Native) is up to ~3x faster than with workerd and 50x faster than miniflare.
Note that in this benchmark we are running an incredibly simple workload
One of the strong points of WinterJS is that is compilable to WASIX so it can run fully (without any extra dependencies) in Wasmer.
Here we have the comparison… beware that you may be surprised of the awesome performance!
Note: complex workloads will run likely run slower in WinterJS WASIX since there’s no JIT there. We chose a simple example to showcase the capabilities of WASIX instead of focusing on the performance of JS in Wasm
As we can see, WinterJS running in WASIX is gearing up to 18,000 reqs/sec, which is impressive since we have spent no time on optimizations on the Wasm side (yet).
However, this benchmarks are fairly biased since we are running a workload which does very little JS computation cycles.
Let’s try now running a more realistic complex workload with WinterJS (Natively vs WASIX):
Note that in this benchmark we are running a complex example doing SSR with React
complex.js(weighting around 580 KB)
So, why it’s slower running a complex workload?
In summary: WinterJS is blazing-fast when compared to alternatives!
We hope you enjoyed reading this article and that you become as excited as we are in our quest of bringing JS Service Workers to it’s maximum speed. Lets brake some records!
Follow the project in GitHub: WinterJS in Github.
By creating WinterJS we are aiming to move our website Next.js frontend from Vercel into Wasmer Edge and save tons of $ on the process :)
Stay tuned for more updates!
Syrus Akbary is an enterpreneur and programmer. Specifically known for his contributions to the field of WebAssembly. He is the Founder and CEO of Wasmer, an innovative company that focuses on creating developer tools and infrastructure for running Wasm
Founder & CEO
What about WASIX?
Syrus AkbaryOctober 27, 2023
Syrus AkbaryOctober 5, 2023
engineeringwasmer edgeedge computing
Syrus AkbaryJune 15, 2023
wasmerwasmer edgerustprojectsedgeweb scraper
RudraAugust 14, 2023