??? 08/17/06 20:00 Read: times |
#122497 - 10 lines PLUS a whole bunch of 'lines' Responding to: ???'s previous message |
Several people have looked at this code before me. Why didn't anyone spot this ? I don't get it. I suggested replacing it with 10 lines of C that do the same job.
10 lines PLUS a whole bunch of 'lines'. Have a peek a the library call to calculate it. OK, just for fun, replace it with "10 lines of C" and see the timing of the product unravel. AAH, you may not see that for 3 months, you may not see it in the lab, but you WILL see it in the field. Of course, it IS possible that your app just sit there and wait for someone to press a key to have something calcilated, but then the mistake is not the lookup table, but using a '51 Erik |
Topic | Author | Date |
Things you find ... | 01/01/70 00:00 | |
10 lines PLUS a whole bunch of 'lines' | 01/01/70 00:00 | |
I forgot to mention ... | 01/01/70 00:00 | |
sounds reasonable | 01/01/70 00:00 | |
I'll optimize it tomorrow. | 01/01/70 00:00 | |
haven't heard of that one | 01/01/70 00:00 | |
Do it using the RLC instruction. | 01/01/70 00:00 | |
Optimized results: | 01/01/70 00:00 | |
how does the lookup table approach time | 01/01/70 00:00 | |
Comparison: | 01/01/70 00:00 | |
Table error | 01/01/70 00:00 | |
No error. | 01/01/70 00:00 | |
So how did you calculate/measure the average? | 01/01/70 00:00 | |
Right below the table: | 01/01/70 00:00 | |
I do the same thing | 01/01/70 00:00 | |
Lookup table will win hands down | 01/01/70 00:00 | |
For floats, yes. For long ints ... not so sure. | 01/01/70 00:00 | |
one more thing | 01/01/70 00:00 | |
if the precision is not 'critical' | 01/01/70 00:00 | |
Another source | 01/01/70 00:00 | |
What about a Hardware Solution? | 01/01/70 00:00 |