how to optimize a for loop
- From: andreyvul <andrey.vul@xxxxxxxxx>
- Date: Tue, 30 Oct 2007 18:14:09 -0700
I have this loop (all variables are pointers):
for (foo = bar; foo > baz; foo--)
*(foo+1) = *foo;
How do I optimize the pointer swap so that it uses -- and ++ or unary
+- instead of +1 (if possible - I don't want to have more #defines
than code)?
IOCCC winners can really help me with this :P
.
- Follow-Ups:
- Re: how to optimize a for loop
- From: Eric Sosman
- Re: how to optimize a for loop
- From: Keith Thompson
- Re: how to optimize a for loop
- From: user923005
- Re: how to optimize a for loop
- Prev by Date: Re: A Trend Towards Lower Software Maintenance Budgets?
- Next by Date: Re: printf("%d",float)
- Previous by thread: Macro that expand differently depending on the function calling it.
- Next by thread: Re: how to optimize a for loop
- Index(es):