Hi this is not an urgent question, but one which has puzzled me, and left completely speechless.
On my Ubuntu machine, I built two docker environments for cross compiling for ARN (I statically link the dynamic libs).
– The first docker image has arm-linux-gnueabinf-gcc v.11.4.0
– The second docker image has arm-linux-gnueabinf-gcc v.13.2.0
When running either natively on my x86_64 machine (using Qemu) or on the target machine hosting an ARM cortex-A9 (which is based on ARMv7-a).
The first binary compiled by v.11.4.0 takes 6.5 seconds to execute
**The second binary compiled by v.13.2.0 takes 0.04 seconds to execute **
I was expecting maybe at most 10-20% percent speed increase if the updates in the new compiler were sooo great, but not a >10000% increase in speed, this is crazy!!!
I uploaded the binary plus the readelf output plus the make and cmake output (make was run for VERBOSE so that you check the different cmd_line_arguments at a git repo I just created https://github.com/AESASH/ARM_discrepancy (don’t butcher me for this, I thought it was better then sharing a folder from a cloud storage).
If you have a Linux machine with an x86_64, you can run the program seamlessly since linux distributions come with “binfmt_misc” that will automate the execution of the arm binary under QEMU without the user even noticing.
If you don’t trust me (and its your right not to) by running the binary directly on your machine, then you can run it in a sanboxed environment by using Docker, VBox, or Firejail.
Additional NOTES:
- Both Binaries compiled with debugging option so that you can better analyze them (if you care that much)
- Readelf for both files available on git repo linked above
- Also CMake Output
- Also Make with VERBOSE=1 output
- If you objdump the binary with arm-linux-gnueabinf-objdump, you will see that both binaries have the same instruction set, plus the NEON SIMD extension.
Looking Forward to hearing your thoughts, cause I am speechless
Regards