The author of Just, a minimal JavaScript runtime built on V8, writes about its performance and benchmark results.
HN commenters link it to explain why a JavaScript framework ranks so high in TechEmpower benchmarks, noting it is a thin wrapper over V8 with native code.
TechEmpower benchmarks and The Benchmark Game[0] are pretty comprehensive. The latter has not yet been updated for .NET 9. The former has been updated with .NET 9[1], but will have to wait for the next round of results. You can see the continuous results, though[2]
I know that TechEmpower gets a lot of flak for being "unrealistic", but it's easy enough to filter out the pure middleware ones. But even those I feel are "fair game" because it shows that such optimizations are possible on the runtime if needed. The story behind one of the top entrants, Just(js) talks a bit about this[3]
[0] https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html
[1] https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj
[2] https://tfb-status.techempower.com/
[2] https://just.billywhizz.io/blog/on-javascript-performance-01/
It'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/
Depending on specific use-case, today's JavaScript code is only 2–7 times slower than corresponding C++. That's pretty damn fast. Faster than some compiled languages. Fast enough that if you wanted to obsess over performance you can build the fastest backend framework in Node.js[0][1]
[0] https://www.techempower.com/benchmarks/#section=data-r21&test=composite
[1] https://just.billywhizz.io/blog/on-javascript-performance-01/
Bun is currently lacking workers, which at least for me is a dealbreaker. I'd also think it'd be interesting to compare against justjs when it comes to speed, since that is a very small wrapper around V8 (much smaller than node/deno) and manages to score extremely high on techempower benchmarks (top 25 on all, first/second spot on a few): https://just.billywhizz.io/blog/on-javascript-performance-01/
i played around with this a while back. you can see a demo here. it also lets you pull new WAL segments in and apply them to the current database. never got much time to go any further with it than this.
https://just.billywhizz.io/sqlite/demo/#https://raw.githubusercontent.com/just-js/just.billywhizz.io/refs/heads/main/sqlite/demo/db/chinook.db
Not familiar with Just, but seems its designed as a minimal wrapper over v8. The benchmark code is probably jumping directly from JS to native code... most of the github repo is C++
Edit:
There's actually an article that explains how Just ranks so highly
https://just.billywhizz.io/blog/on-javascript-performance-01/