At the Node.js runtime level, UUID v4 generation is usually not the bottleneck. Calling crypto.randomUUID() is cheap compared with network I/O, database round-trips, cache misses, external API calls, or JSON serialization on large payloads. If you are profiling a normal API request, UUID generation will almost never be the dominant cost.
The performance discussion gets more interesting after the ID is generated. UUID strings are larger than 64-bit integers. That affects memory footprint, wire size, log size, index size, and join efficiency. In small systems, the cost is often negligible. In large systems with heavy writes and large indexes, it becomes real. Larger keys mean fewer values per page and less efficient index caching.
There is also a difference between generation performance and storage performance. Developers sometimes ask whether UUID v4 is “fast,” but that bundles together two separate questions. Generation in Node.js is fast enough for almost every normal application path. Database behavior can be much more expensive, because random UUIDs create random insert patterns in B-tree indexes. If you care about throughput, index fragmentation, and write locality, that database cost matters far more than the time it takes to generate the string in JavaScript.
If you are generating millions of IDs inside a hot in-memory loop, benchmark your exact workload. For normal HTTP services, job workers, and event consumers, the bigger performance decision is not whether Node.js can create UUID v4 quickly. It is whether your database should use that random UUID as a primary key.