gcc has always produced faster code for at least 15 years. In fact, it is the Intel compiler which has caught up in the most recent version.
By nature, this code had no usage of floating point in its critical path.
I haven't bothered with icc in years though.
One thing I found that you do have to be careful with though is ensuring that Intel uses IEEE floating point precision, because by default it's less accurate than GCC. This causes issues in Eigen sometimes, we ran into an issue recently after upgrading compiler where suddenly the results changed and it was because someone had forgotten to set 'fp-model' to 'strict'
It goes without saying that you should use -O3 (or -O2 for some rare cases) otherwise. I am mentioning it just in case because 2.5x slower sounds so exotic to me that the first intuition is that you're omitting important optimization flags when using GCC. GCC was faster than Intel on everything I tried in the past.
I don't know if Oracle is still using ICC for that or not. (If you download Oracle RDBMS, and check the binaries, you will be able to work it out. I can't be bothered.)
[1] https://www.businesswire.com/news/home/20030507005238/en/Ora...
Many compilers statically link implementations of various built-in functions into the resulting executable, and that can result in different symbol table entries
I can't even find benchmarks of ICC vs a current GCC but they were pretty even the best part of a decade ago. GCC is a mess compared to LLVM but it's quick.
I'd suspect the same from Unity.