≈ the.bay.news

Node.js 26's Map.getOrInsertComputed is slower than the get-and-set it replaces

DEV Community
Node.js 26's Map.getOrInsertComputed is slower than the get-and-set it replaces
I benchmarked Node 26.13's new Map.prototype.getOrInsertComputed: 13-18% slower than plain get-then-set on a cold map, about 40% slower on a warm one, but it collapses three concurrent async fetches for the same key into one call, and caches a rejected promise forever.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.