Without having C code which generates the additional bytes in V5.0/V5.1 its impossible to say where you additional 0.1% of code is from. Could be fixes, could be just changes, which help for other patterns but make it worse for yours. Can you provide actual code samples, best if complete compilable parts?
To see how many bytes are missing, you can just make the areas in the prm file temporarily a bit larger so it links, don't forget to undo it tough :smileyhappy:.
Things to gain a few bytes:
- make sure your most often used variables are in the zero page, qualified in a section declared with __SHORT_SEG. (#pragma DATA_SEG __NAME SHORT_SEG)
- try to use -odocf="-or" or -odocf="-one". -odocf compiles the source with and without the given open, sometime its better with sometime without, -odocf picks the smallest one for you. This makes the compilation slower, but I would expect it to gain more than this 0.1% :smileyhappy:.
- use smaller and/or unsigned types if all values match, prefer (unsigned) char to int, unsigned int to plain int, int to long, ...
- there is a linker optimization to overlap the same code patterns (check the linker manual, don't remember the option by heart)
BTW. -Ou only changes the behavior if there is inline assembly in the same function, otherwise it is default. -Os and -Of are default too, so no wonder -of does not gain anything :smileywink:
Daniel