Ah so. Well in that cast, no doubt the fastest way to clear the array is to call memset() since it's probably optimized asm code, as said earlier in this thread. --- In AVR-Chat@yahoogroups.com, "kernels_nz" <kernels@...> wrote: > > In this application, the arrays represent individual LEDS on the led > nameboard. These run as 8 * 8 modules from 4 * 16 bit Constant current > shift registers. Similar to 74HC494, but with Constant Current Drivers. > > I need to clear the arrays everytime I change the display, I found it > faster clearing the arrays then just incrementing the indexes that > have LEDS that are to be on. I I were to assign either a 1 or 0 to > each one instead of just incrementing the ones that are on, it would > take longer than just clearing the arrays to start off with. > > Hope that explains it a bit, from the different methods I tried, the > one where I clear the arrays first seems to compile to the smallest size. > > I was really just looking for a faster way to do this, I figured > someone may have come across a clever way using pointers. > > Thanks for all the replies ! > > Cheers > Hein B > Auckland, New Zealand >
Message
Re: Clearing Arrays In C
2007-04-19 by stevech11
Attachments
- No local attachments were found for this message.