Does enabling `nodejs_compat` in Cloudflare Workers slow down the worker's performance?

Is there any performance impact?
4 Replies
kian
kian3mo ago
There shouldn't be.
James
James3mo ago
As Node.js adds some extra overhead, why is there not a performance issue?
kian
kian3mo ago
Workers never run Node.js It's just some modules added into the runtime https://github.com/cloudflare/workerd/tree/main/src/node
Chaika
Chaika3mo ago
node_compat option in wrangler polyfills/adds a bunch of stuff to your bundle, which would slow down loading and such, but for nodejs_compat flag the modules are already there in the runtime, just not enabled.