Deno vs. Bun performance is rigged

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • I was hesitant as to how much I should go into this because you get into the semantics of the benchmark but this [0] thread goes into why - that particular implementation doesn't behave the same way as the other implementations, it uses a different db driver that doesn't synchronise, which won't be allowed in the next version of the benchmarks. Techempower publish regular snapshots of their benchmarks at [1], and if you look at any of the snapshots that aren't the last published set where the discrepancy was fixed you'll see that all of the js implementations lag far far behind.

    [0] https://github.com/TechEmpower/FrameworkBenchmarks/issues/72...

  • just

    the only javascript runtime to hit no.1 on techempower :fire: (by just-js)

  • ...and the fastest server is javascript.

    https://github.com/just-js/just

    Not that you should choose it over node or bun.sh or deno. I look forward to seeing where bun.sh ends up on the chart.

    Currently (well, as of the last benchmark, in July) deno is 0.9%-1.6% of the speed of the fastest options, while faster node options are around 20-40%.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • deno

    A modern runtime for JavaScript and TypeScript.

  • > How do we know this?

    Looking at the source code [0] for Deno HTTP server, they spawn at least one thread for the server to listen and handle requests, before they are sent through a MPSC channel to the thread running the Isolate.

    [0]: https://github.com/denoland/deno/blob/07213dec94398aab687afd...

  • libs

    blessed js libraries for just-js (by just-js)

  • like bun or node or deno (Rust as well as C++).

    in techempower, the vast vast majority of code running in the just-js entry is JavaScript. all the core libraries for networking and interacting with the OS are js wrappers around C++/v8. the http server, though incomplete and not production rady, is written in javascript, with http parsing handed off to picohttpparser. the postgres wire protocol is completely written in javascript. in fact, one of the advantages JS and other JIT languages have is you can optimize away a lot of unnecessary logic at run time when you need to. e.g. https://github.com/just-js/libs/blob/main/pg/pg.js#L241

    the whole point of doing this was to prove that JS can be as fast as any other language for most real world web serving scenarios.

    if i had more time to work on it, i am sure i could improve the fortunes score where it would be at or very close to the top of that ranking too.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts