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

Optimisation Levels 10, 11

Level 10: Rearrange Code;
Level 11: Reuse of Common Exit Code.

Does anyone have any experience of these higher optimisation levels, relying on the LX51 Linker?

This thread reported some bugs, and expressed some misgivings about the advantages:
http://www.keil.com/forum/docs/thread2094.asp

That was v7.02; now we're at v7.07a:

Can anyone confirm that the bugs are really fixed now?

Does it do any better now?

Any other plaudits, Gotchas! or concerns?

Parents
  • It's beginning to look as though level 11 hasn't actually been implemented and level 10 is being used instead. It would be interesting to compare the final binaries.

    Andy, you seem to have a big drop in code size from 9 to 10, whereas Christophe does not. Did you definitely have code packing on for both tests?

    Stefan

Reply
  • It's beginning to look as though level 11 hasn't actually been implemented and level 10 is being used instead. It would be interesting to compare the final binaries.

    Andy, you seem to have a big drop in code size from 9 to 10, whereas Christophe does not. Did you definitely have code packing on for both tests?

    Stefan

Children
  • "Did you definitely have code packing on for both tests?"

    No, I didn't!
    I hadn't thought of just turning the Packing ON without also increasing the Optimisation level.

    So here's the full results:

    Packing
    OFF        Linker Code Packing ON
    -------  ---------------------------
    9,SIZE   9,SIZE  10,SIZE    11,SIZE
    65094    58074   57930      57930
    
                     10,SPEED   11,SPEED
                     61242      61242
    (well, not quite "full" - I didn't do the "SPEED" ones).

    So, like Christophe, I see a large gain in enabling the Linker Code Packing, a small gain in increasing the Optimisation level from 9 to 10, and no gain whatsoever in increasing the Optimisation level from 10 to 11.

  • "a small gain in increasing the Optimisation level from 9 to 10"

    About 0.25%, in fact. Hardly worth it really.

    Stefan

  • "About 0.25%, in fact. Hardly worth it really."

    Unless, of course, it was just that last ~150 bytes that was keeping you from fitting the code into the ROM!!