It's that fast because it uses a declarative model and this ends up being very efficient for a variety of use-cases
(I say this speaking from a NixOS laptop; Nix operations are invariably much faster than alternatives, like Docker, assuming you have the technical chops to get them to work)
React also uses a declarative model, in fact React might be more declarative because it's still declarative at runtime, whereas Svelte et al. do a lot of static analysis to turn declarative UI into imperative targeted dom updates.