Disappointing, I thought, especially because in addition to extra two cores I now sport a quad-channel DDR RAM. Well, turns out that compiling my Go projects does not generate enough "hot" threads, and the Linux scheduler keeps moving them around between 6 cores, letting the cores to "cool down" and drop to 1.2Ghz idle frequency. Meanwhile the 4-core box is happily spinning at 3.4-3.8Ghz during the compile cycle.
The only way to make the 6-core box to perform was to enable "performance" policy for intel_pstate which leads to the CPU running at its full speed even at idle (not great). Once I did that I saw the performance increase by 50%.
Here are the compile times of the same project on both machines with different CPU frequency scaling policies:
governor/cpu 4-core 3.4Gz 6-core 3.3Ghz
------------ ------------- --------------
standard 13 sec 15 sec
performance 11 sec 9 sec
As far as I know, AMD does not have an equivalent of intel_pstate in Linux kernel and relies on legacy ACPI governor which isn't as sophisticated as Intel's (where the CPU is more self-regulating) and I wonder what kind of effects to expect in regards to performance / power consumption if I go for Ryzen.