Acknowledged

SDK 6.2.2 compiler optimization degradation compared to SDK4.2.x

When switching to SDK 6.2.2, compiler optimization -O 3p generates code that is significantly less optimized for speed/number of instructions than with the same optimization with SDK 4.2.x.

I have a widget that used to run fine when compiled with SDK 4.2.x, but under SDK 6.2.2 I now get "code executed too long" error without any code change (I was able to optimize my code manually to get back under the limit but it begs the question on what was changed for compiler optimization in the new sdk)

This case is on fenix 7.

Maybe this can be useful to know for other developers since one should make sure to test corner cases when close to the limit with the older sdk.

Parents
  • The code that seems to trigger the execution too long under sdk 6.2.2 but not under 4.2.x is a set of loops with a fair amount of computation as follows:

      - large numbers of Math.sin and Mat.cos

      - large number of multiplications and additions

      - reference to nested dictionaries and multi-dimensional arrays. For example direct calls like "CachedArray[rank][Index][lineIndex][pointIndex][1]"

      - if statements with multiple conditions

    I am able to generate the log.zip files. Let me know how to use them or what to look for.

    Thanks for the response.

Comment
  • The code that seems to trigger the execution too long under sdk 6.2.2 but not under 4.2.x is a set of loops with a fair amount of computation as follows:

      - large numbers of Math.sin and Mat.cos

      - large number of multiplications and additions

      - reference to nested dictionaries and multi-dimensional arrays. For example direct calls like "CachedArray[rank][Index][lineIndex][pointIndex][1]"

      - if statements with multiple conditions

    I am able to generate the log.zip files. Let me know how to use them or what to look for.

    Thanks for the response.

Children