This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

which kind of compiler optimization can be applied in this code?

compiler: linaro-aarch64-2020.09-gcc10.2-linux5.4

optimization option: -O3

CPU: Arm A53 1Ghz

Hello, this is newbie.

code1 is 3.1x slower than code2 

- code1: 106 ms

- code2: 34 ms

I think using constant in for-loop is the only(?) difference. 

I really wonder why such big performance difference between two code.

<code 1: img_bitshift function>

<code 2: copy and paste of img_bitshift function>

Thank in advance.

0