Hi, @zhangchun
Hard FP (floating point) will use the FP instructions of the device whereas soft FP will defer to software emulation of FP operations. That is, FP operations are performed by making a library call and the floating point operations are performed using integer instructions.
- The only difference between softfp and hard is the manner in which floating point values are passed and received from functions. (softfp ABI vs. hard ABI).
- Both softfp and hard will generate floating point instructions, but since you do not pass the float values to functions, you will see no difference.
- So, to truly see a difference between a software float operation and a hardware float operation, use the 'soft' option.
-
- To understand more about it please check this page: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

Now, another thing, you can check generate the disassembly file and understand the difference for different float ABI options - soft, hard, and library with FP.

Additionally, sometime compiler might optimization also play role, and if the operation is not resource intensive compiler might decide to do differently than you are expecting. You can also check different test case operation to ty out.
You can change the optimization settings and check accordingly if it improves the performance or not:

Please, can you check and tryout, let us know if you are able to get performance improvement accordingly.
Thank you, Best regards,
- Mehul Patel