In the early 2000s, Linux binaries did run faster on FreeBSD than on Linux on the exact same hardware, when using a stock FreeBSD install and a stock (but light) Linux install.
I recall reading at the time that it was because FreeBSD's kernel simply had less overhead overall and consumed fewer resources in its work, making that bit of CPU available to running processes instead of consuming it itself.
After using FreeBSD, the Linux kernel appeared very bloated and slow, at the time. And it was, as distributed by distro makers. So the comparison was fair, stock FreeBSD vs. stock Linux. If you want to argue that you could do better than stock FreeBSD with a custom Linux kernel, you'd be right, and if you allowed a fair comparison with a custom FreeBSD kernel, I think Linux would have again struggled to remain in the lead.
All of that being said, this landscape may have changed entirely. The Linux kernel has come a long way. The FreeBSD kernel has come a long way. So where things are now is unknown to me.
I will say that superior performance is not always the reason to choose an OS for high performance computing tasks. It is a sane decision to use an OS that has lower performance if it provides other benefits that are important to you.