David Kelly Wrote
>On Fri, Mar 06, 2009 at 10:57:03AM -0500,
subscriptions@aeolusdevelopment.com wrote:
>>
>> void put_bytes( unsigned char * const buf, int num)
>> {
>> int i;
>>
>> for( i=0; i < num; i++){
>> serial_out( *buf);
>> buf++;
>> }
>> }
>
>Benchmark that against the same using index logic rather than pointers.
>The last compiler I used that generated faster/smaller code with
>pointers was for the 68k.
Written for clarity. I generally use array syntax for arrays and pointer
syntax for pointers. Let the compiler sort it out.
In any case the serial port overhead will likely swamp the pointer/indexing
overhead.
Robert
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2webMessage
Re: [AVR-Chat] Array of Long
2009-03-06 by subscriptions@aeolusdevelopment.com
Attachments
- No local attachments were found for this message.