| ??? 06/28/05 06:07 Read: times |
#96074 - Incorrect Responding to: ???'s previous message |
Tp Ow said:
Also, good at making function calls faster.
Imagine . Switch(number) case 0: ... ; break; case 1: ... ; break; . . . case 100: ... ; break;So, Case100 is getting the least priority. . No, that is almost certainly wrong. Especially for 100 sequential cases, the compiler will almost certainly generate a jump table, so each case gets exactly the same priority - that is the whole point of a switch! http://www.8052.com/forum/read.phtml?id=43443 Also, the 8051 doesn't have an indirect Call instruction, so the compiler must have to do some clever trickery to get function pointers to work - which is hardly goig to speed things up...! |
| Topic | Author | Date |
| Coding a Jmp table in C | 01/01/70 00:00 | |
| Jmp Tables in C | 01/01/70 00:00 | |
| you do not | 01/01/70 00:00 | |
| Call table? | 01/01/70 00:00 | |
| Of course not! | 01/01/70 00:00 | |
| use jmp@a+dptr | 01/01/70 00:00 | |
| jmp table not in C | 01/01/70 00:00 | |
| Wrong ends of sticks? | 01/01/70 00:00 | |
| You do not control the Compiler Output | 01/01/70 00:00 | |
| You can not have your cake and eat it to | 01/01/70 00:00 | |
| Jump Table in C | 01/01/70 00:00 | |
| Call Table? (again) | 01/01/70 00:00 | |
| Call Table? (again) | 01/01/70 00:00 | |
| I never did use function pointers | 01/01/70 00:00 | |
| No pain, no gain. | 01/01/70 00:00 | |
| the overlaying | 01/01/70 00:00 | |
| There can be a gain. | 01/01/70 00:00 | |
| My 2 cents worth | 01/01/70 00:00 | |
| Incorrect | 01/01/70 00:00 | |
As Matter of Fact.... | 01/01/70 00:00 |



