Re: Linux kernel, possible useless continue
- From: Rainer Weikusat <rainer.weikusat@xxxxxxxxx>
- Date: Tue, 20 Mar 2007 10:53:55 +0100
Ulrich Eckhardt <doomster@xxxxxxxx> writes:
[...]
for(...)
if(x)
continue;
for(..; .. && !x; ..)
..
The only difference is the initialisation statement in the inner loop, and
for the case we're talking about this small difference doesn't make a
difference overall, in particular not when it is compiled with a
halfway-decent optimiser.
As I understood the original question, it was about code semantics and
not about hypothetical, accidental properties of unknown machine code
generated by a random compiler for an arbitrary architecture. And
wasn't "established theory" that one should rather not code to the
idiosynkrasies of some translation or execution environment, but
instead try to express the intent of the code clearly and leave 'the
gory details' exactly to the compiler?
.
- Follow-Ups:
- Re: Linux kernel, possible useless continue
- From: Ulrich Eckhardt
- Re: Linux kernel, possible useless continue
- References:
- Linux kernel, possible useless continue
- From: Bin Chen
- Re: Linux kernel, possible useless continue
- From: Ulrich Eckhardt
- Re: Linux kernel, possible useless continue
- From: Iwo Mergler
- Re: Linux kernel, possible useless continue
- From: Ulrich Eckhardt
- Linux kernel, possible useless continue
- Prev by Date: Re: Linux kernel, possible useless continue
- Next by Date: Re: Linux kernel, possible useless continue
- Previous by thread: Re: Linux kernel, possible useless continue
- Next by thread: Re: Linux kernel, possible useless continue
- Index(es):
Relevant Pages
|