Deno's is probably written in rust via the tokio rust crate. This version of fetch in NodeJS is written in JavaScript. It would probably get upgraded to C++ in due time once it's mature enough.
This is very new and the implementation _just_ landed today so it makes sense Deno would be faster with an API they have been working on for years.
I am confident that Node's implementation will _eventually_ have comparable performance.
That said: please do open an issue in the undici repo at https://nodejs.org/node/undici so this gets tracked.
That URL gives me a 404 – should it be https://github.com/nodejs/undici ?
Re:Fetch API has landed into Node.js
by ignoramous on Tuesday February 08, 2022 @03:57PM
(#30264588)
Thanks. Filed: https://github.com/nodejs/undici/issues/1203
> ...we'd love to hear from the community what you'd like to see.
In our tests, fetch on Deno was wayy faster than undici fetch that now has been merged into nodejs.
I couldn't figure out why that was case, but forwarding requests over node's http2 client (instead of undici fetch) then had comparable (but not as fast) performance as Deno (presumably because our hand rolled impl lacked connection pooling).