WSL2 runs a Linux VM via Hyper-V at close to native performance.
However, it slows down if you do any type of cross-os file system communication. So you need an IDE that knows how to work around this (eg: VSCode with WSL2 plugin runs a server in the VM to avoid cross-os fs comm)