Decompile your program and take a look at the bytecode generated by both a
while(true) loop or a for(;;) loop. The compiler ought to be intelligent
enough to detect this type of construct and use the same low level structure
to execute an infinite loop.

Let me know what you find.


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> mayank p bhatt
> Sent: Saturday, September 29, 2001 6:37 AM
> To: [EMAIL PROTECTED]
> Subject: plz guid me..which one is efficient...
>
>
> Dear Sir,
> I have very important  question
> which one is more efficient when I want to run infinite loom
> while(true)
> {.................}
> OR
> for(;;)
> {.................}
> or any other suggestion,
> because I am using infinite loop many times in my program,
> I have tried to calculate time for executing same thing for both,
> but result are inconsistent,
> plz tell me,
> regards,
> Mayank Bhatt
>
>
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to