Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


C++/c Handbook "quality File Programming Guide," a 小bug

Fifth problems
5, Please describe briefly the following two advantages for the cycle (5 minutes)



For (i=0; i<N; i++)

{

If (condition)

DoSomething ();

Else

DoOtherthing ();

}
If (condition)

{

For (i=0; i<N; i++)

DoSomething ();

}

Else

{

For (i=0; i<N; i++)

DoOtherthing ();

}

Simple procedural advantages :



Disadvantages : implementation of the N-1 times more logical judgment, and interrupt the cycle of "assembly line" operation, making the compiler can optimize the cycle and reduce efficiency.
The high cycle efficiency advantages :



Disadvantages : not simple process





This condition is not a prerequisite for the changes, the two are totally different from the trends in the condition, program 2 is wrong, it is far from the efficient.

-->


This book shipping or less for good

-->

Lin nod!! especially the tone and the tone of voice I am very disgusted, but most of the contents of which are inside the effictive cpp



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com