AVX code is known to make the CPU run way hotter than usual. Perhaps that caused throttling that made general code running at the same time, or within a short span thereafter, perform worse?
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
where instead of cpu0 you can write any core number, and it will give you the current frequency of that core in KHz.