oyvind> are you keeping two lists? One list for active and one for all taps?
One list. With an "p->enabled" element. Duane> 2) There is a ghost variable (that holds the length of the list) oyvind & rick> [ this is good for performance ] Agh... Really? I suspect both of you have fallen into the "always use qsort()" trap. [ie: For small things, it is simpler to do it brute force] We are not talking about a list that is 1000 items long, we are talking about a list that at most is about 5 to 8 items long. On a desktop PC - the "time to count" is measured in microseconds and it lives in the cache, and it does not happen that often. Even using Zylin's little zy1000 at most it is perhaps 3 to 4 instructions per item in the list instructions. So - a couple microseconds. That is not where the performance problems are. Duane> [all these indirect index references to positions on the list] Duane> I believe all of these should become just a "tap pointer". oyvind> sounds great from a performance point of view :-) I view it as a code maintenance and source of bugs problem. - ie: Do something the you call some function called "update_the_global_variables()" but - you miss one some where. Duane> [str9 flash may break] oyvind> [that is ok - we fix it later] Fine with me. In fact, I'll put an LOG_ERROR in there and force it to fail error wise until it is fixed. oyvind> How far are you away from a final plan and when do you think oyvind> would be a good time to do this? Plan was generally the churn of emails earlier. Working on it today. -Duane. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development