After configuring Windows 11 in a VirtualBox VM I ran some tests, including the benchmarks. It turns out the Windows version runs about 20% slower then the Linux version. I wonder why. Both are compiled with GCC 11.2 using PGO. This difference shows on bench/run.pl
from the sources as well as another program. I wonder whether this difference is real or it is due to the usage of a VM. Ok, VMs slow down a lot, but I thought not the CPU and running these benchmarks involves very little OS interaction.
Anyone with both Windows and Linux on the same hardware who can confirm this? If virtualization is the problem we should see the reverse between the native Windows version vs using WSL2. A dual boot system or two identical systems running Linux and Windows is probably the only safe comparison.