Content originally posted in LPCWare by moogde on Fri Sep 25 07:53:08 MST 2015
Thanks again for pointing out the right directions!
I'll be trying out some of that stuff. Coming from the assembler, I think the possibility to explicitly locate variables in some global registers might be important. In ASM I'll just use a few registers for temporarily stuff within functions (these registers are never touched by interrupt routines). So I think this might help here, too, because it means that some "fast access" standard variables are always there to use. They then also could be used to transfer data to and from functions.
But of course i'll check if that really makes sense in the end with the disassembly.
I played with the Optimization-Settings a bit (didn't know that those existed yet), and it helped a lot in terms of execution speed, but I also missed some of my function's code at the highest optimization setting in the listing file. Is it possible that the Compiler at higher optimization settings is actually generating the same subroutine five times, when it gets called 5 times in the source code? (To omit all the additional steps for the calls, returns)
(But thats not a real important question, I'll find this out myself probably.)
Thanks a lot so far! I might post other questions when they occur :)