this post was submitted on 19 Feb 2026
0 points (50.0% liked)

JavaScript

2679 readers
13 users here now

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] spartanatreyu@programming.dev 3 points 2 weeks ago (3 children)

This benchmark is pretty useless.

There's no benchmark code shown to see if they're doing something wrong or cherrypicking.

Also, they only tested on arm64? Why weren't they testing on x86-64?


And what the hell is this test?

Common data transformation pattern, map then aggregate with reduce.

People who care about performance are using loops, not map(). Why are you even testing the slow path?

[–] sin_free_for_00_days@sopuli.xyz 1 points 2 weeks ago (1 children)

I think it's a poorly hidden advertisement.

[–] codeinabox@programming.dev -1 points 2 weeks ago (2 children)

For what? I don't see any products or services being promoted in this article.

[–] sin_free_for_00_days@sopuli.xyz 3 points 2 weeks ago (1 children)
[–] codeinabox@programming.dev 0 points 2 weeks ago

So to confirm, you don't trust blogs where the company is selling a product or service, even if they don't mention it in the article? If so, that would cover a lot of articles shared on this instance.

[–] spartanatreyu@programming.dev 2 points 2 weeks ago

I don’t see any products or services being promoted in this article.

That's kind of the point. You're not supposed to.

They're farming links so search engines see their domain as more important. That way, their entry will appear higher up on search results against competitors for their paid products.

[–] codeinabox@programming.dev 1 points 2 weeks ago (1 children)
[–] spartanatreyu@programming.dev 1 points 2 weeks ago

It's a garbage article.

It's not checking other's claims, it's not saying anything new, it's not even listening to the majority of the parties.

For each of the parties (node, deno, bun): they are incentivised to only release benchmarks that make themselves look good, and are disincentivised to release benchmarks that make themselves look bad.

This article only uses benchmarks from one party then declares it the winner.

So, it's garbage.

[–] codeinabox@programming.dev 0 points 2 weeks ago (1 children)
[–] spartanatreyu@programming.dev 1 points 2 weeks ago* (last edited 2 weeks ago)

Bro, how are generators going to be faster?

This is an AI article.


My results:

Firefox:

Loop: 44ms - timer ended

Generator: 4580ms - timer ended

Node (uses same engine as deno, chrome, edge):

Loop: 30.577ms

Generator: 1.533s

Safari (uses same engine as bun):

Loop: 605.222ms

Generator: 2804.669ms

Bun (same engine as Safari but without needing to apologise for Safari):

[17.52ms] Loop

[297.17ms] Generator


Generators are going to be slow because:

  • they're going to be stack switching so much in JS runtimes which adds a lot of overhead
  • JS doesn't have the other language features (yet) that you want to use with generators, which makes less folks want to use generators, which makes implementers not want to spend time optimising them. (Why bother trying to inline generator state when it's probably going to change once the adjacent features come in?)

Until generators don't rely on stack switching, they're always going to be super slow.