I found how to use one specific register bank for a function (interupt)by specifying using My_Bank and so, be faster (less PUSH and POP)but I would like to know if I can specify a variable to be located in one register bank (for speed), and, if yes, how to do it?
regarding to genarated code by C compiler with speed optimisation, I think I could win just 1 or 2us...
I don't know anything about your application, so I cannot tell if 2 microseconds is substantial or not. But I would avoid using non-standard C or assembler trickery unless absolutely necessary. As Donald Knuth put it, "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." Code readability is important, and you will lose some of it when optimizing. The above applies to production code. In contrast, if you are trying to push the limits of processor/compiler for educational purposes, you can probably afford some amount of messy code...
Regards, - mike
Ok, it's what I think and I say... just for 1 or 2us, it's better to to prioritys the readability of the code... I just looked for a simple way to use Registers like in the 80c196... the way seem to use IDATA like it' said below...