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

a proposal ?

I have a thought that would make many processes much more effective and, being only one voice, I would like to know if there is a demand before I propose it to Keil.

This is the result of me having to change a switch statement to a series of IFs to make an ISR process fast enough.

I realize, and thus do not complain, that Keil caould not implemet an ANSI-C switch more efficient than the way it is done.

'n' below will be either 2 or 3 (if Keil decide to implement, they can choose)

a Proposal:
if #pragma QUICKSWITCH then
a) no case value can be more than 255
b) all case values must be multiples of n
c) the switch will be implemented as a jump table

Erik

Parents
  • a footnote to the above:

    I once had a timing error that only did show when the optimizer was active. Debugging it, by any 'helped means' (emulation) was impossible beacuse the critical sections were 'combined' with frequent operations by the optimizer. For that reason it took 6 weeks to find a problem that, had it shown in non-optimized, would have been a matter of a day or two. It turned out to be a subtle bug in a (then) recently released Atmel derivative, not the design.

    Erik

Reply
  • a footnote to the above:

    I once had a timing error that only did show when the optimizer was active. Debugging it, by any 'helped means' (emulation) was impossible beacuse the critical sections were 'combined' with frequent operations by the optimizer. For that reason it took 6 weeks to find a problem that, had it shown in non-optimized, would have been a matter of a day or two. It turned out to be a subtle bug in a (then) recently released Atmel derivative, not the design.

    Erik

Children
No data