Open lino-levan opened 1 year ago
More data, using multiple React versions on the other runtimes too. With the upgrade, Bun gets much faster, Node gets barely faster, and Deno becomes extremely slow. I kept the versions of react and react-dom in sync although from testing with Deno it seems like the significant performance drop is due to react-dom (i.e. react 18.3 + react-dom 18.2 performs fine).
Runtime | Req/s (React 18.2) | Req/s (React 18.3) |
---|---|---|
Bun | 49237 | 62326 |
Node | 18506 | 19116 |
Deno | 43228 | 2967 |
Hardware: Framework 13, Intel i5-1240p, 8+16GB DDR4-3200MHz
OS: Arch Linux
Runtimes: Node 20.6.1, Deno 1.36.4, Bun 1.0.1
react/react-dom: latest npm version (18.2.0) or latest next
version (18.3.0-canary-d6dcad6a8-20230914) (I changed esm.run
URLs for Deno as @lino-levan shows, and I changed package.json
for Node and Bun).
Test process: run one of the scripts in the appropriate runtime, and then run bombardier localhost:<port> -d 5s
in another terminal.
I don't know if this is the case here but I've seen varying performance when using react from esm.sh. So maybe this could be a bug in esm.sh? Anyways, a better way to know would be to use same react (probably vendored) for all runtimes.
Given this benchmark: https://github.com/oven-sh/bun/blob/main/bench/react-hello-world/react-hello-world.deno.jsx
Do the following change:
and see the comparison. The performance seems to be really bad. Originally reported by @190n.
Any ideas @littledivy?