??? 07/06/05 12:34 Read: times |
#96684 - Re: Switch/Case Optimization Responding to: ???'s previous message |
On my I2C-handler I use the following optimization:
bad: switch( S1STA & 0xF8 ){ case 0x00: case 0x08: ... optimized: switch( S1STA >> 3 ){ case (0x00 >> 3): case (0x08 >> 3): ... Then the switch was done by a jump table. Peter |