Build process is significantly slower running with self-hosted runner comparing to the running directly on host

The TypeScript build process of my project typically tasks 30+ seconds, but it takes 60+ seconds running with self-hosted runner (macOS/M1).

Does this has anything to do with Rosetta? I am directly using the global Node.js binary (which is native).

Turns out that the global Node.js I installed (via official pkg installer) is universal, and somehow it runs as x64 with GitHub Actions runner. I manually uninstalled the universal version and reinstalled it with homebrew and it now performs as expected.