5 ms·
just.js (#9) looks interesting https://github.com/just-js/just https://github.com/just-js/just It seems to be a much tinier JavaScript runtime than Node.js (s
by Jarred 6y ago
just.js (#9) looks interesting
https://github.com/just-js/just https://github.com/just-js/just
It seems to be a much tinier JavaScript runtime than Node.js (still using v8), but linux only
The benchmark is probably unrealistically optimized code but even so, it implies Node.js itself has a large performance overhead
- chmod775 6y agoIf you're not paying attention it would look that way, yes. If you pay attention you'll notice that just.js is using postgres as their DB, while all of the node benchmarks are handicapped by either using mongoose/mongodb or MySQL. There is no node benchmark with postgres, but all of the fastest benchmarks used it. "lithium" is a good example to show how much of an impact switching to postgres has. All of the 4 lithium benchmarks are identical except in what DB they use. The results are: lithium-postgres-batch (#2 - 659850), lithium-postgres-beta (#13 - 398773), lithium-postgres (#14 - 398258), lithium (#45 - 271989). The last result is MySQL.
- reasonabl_human 6y agoWhat makes postgres special in these cases?
- chmod775 6y agoI would like to know as well. All I know is that for this specific workload there appears to be a strong correlation between the chosen DB and performance. Depending on the benchmark you're looking at on that site, the top 30-60 results are exclusively postgres. Further, for every framework/language that was tested with both MySQL and postgres (there's quite a few of them), the postgres one always ranks higher.
- est 6y ago> the top 30-60 results are exclusively postgres. Perhaps it's because pg had better async drivers?
- ahoka 6y ago"In this test, the framework's ORM is used to fetch all rows from a database table containing an unknown number of Unix fortune cookie messages (the table has 12 rows, but the code cannot have foreknowledge of the table's size)." This is the "workload".
- edoceo 6y agoLikely it's the better/faster support for multi-step transactions. (That's a big point for PG, since at least 2004)
- zerd 6y agoSomehow just.js is faster than Rust and C++ in 20-queries benchmark, they're all using postgres. https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=query https://www.techempower.com/benchmarks/#section=data-r20&hw=...
- Spiritus 6y agoIt's likely because of this (custom Postgres client, request pipelining and not doing sync/commit after each query): > [Multiple Queries] This is the first test where Just(js) has quite a big lead. This is likely due to the fact it is using a custom postgres client written in Javascript and taking full advantage of pipelining of requests. It also avoids sending a Sync/Commit on every query. As far as I am aware this is within the rules but will be happy to make changes to sync on every query if it is not. https://just.billywhizz.io/blog/on-javascript-performance-01/ https://just.billywhizz.io/blog/on-javascript-performance-01...
- Spiritus 6y agoThe author wrote a blog post about it: https://just.billywhizz.io/blog/on-javascript-performance-01/ https://just.billywhizz.io/blog/on-javascript-performance-01...