Re: what does two semicolns ';;' do
- From: jimp@xxxxxxxxxxxxxxxxxxxx
- Date: Sun, 29 Jun 2008 19:05:02 GMT
Iv??n S??nchez Ortega <ivansanchez-alg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Thomas Mlynarczyk wrote:
jimp@xxxxxxxxxxxxxxxxxxxx schrieb:
AIR for(;;) is slightly more efficient/faster than while(1).
How come? Isn't [for] just syntactic sugar for [while] and should
therefore internally be the same?
It really depends on how your compiler optimizes jumps and boolean
expressions. A good compiler will know that both while(1) and for(;;) are
infinite loops and will translate them to non-conditional jumps in
assembler, effectively rendering them the same.
A bad compiler won't.
And some compilers will recognize one but not the other.
--
Jim Pennino
Remove .spam.sux to reply.
.
- References:
- what does two semicolns ';;' do
- From: larry
- Re: what does two semicolns ';;' do
- From: jimp
- Re: what does two semicolns ';;' do
- From: Thomas Mlynarczyk
- what does two semicolns ';;' do
- Prev by Date: Re: what does two semicolns ';;' do
- Next by Date: use SESSION variable?
- Previous by thread: Re: what does two semicolns ';;' do
- Next by thread: Re: what does two semicolns ';;' do
- Index(es):
Relevant Pages
|