Clang vs gcc floating point performance on ARM

1.1k Views Asked by At

I was trying out clang compiler and wanted to check its performance vs tradational gcc. I found out that its performance in terms of floating point operations is very bad compared to gcc (almost 30%). I compared the assembly files of my code with clang and gcc and found that gcc was using F*** (e.g fcmpezd) functions while clanf was using V** functions (e.g. vcmpe.f64). Does this affect no of instructions cycles? I believe both instructions are aliases.

Also, in assembly file whenever a function is defined, arguments are pushed on stack. GCC was using stmfd instruction while clang was using push instruction followed by add interuction adding some value (or register content) to stack pointer (sp). Are the two set of instructions consume same cycle - (stmfd) and (push,add)?

I am using vfpv3 as option while compiling with both clang as well as gcc. Also please suggest some good tool which will tell me how many instruction cycles will an instruction consume.

0

There are 0 best solutions below