View Single Post
  #5 (permalink)  
Old 05-08-2008, 02:56 PM
sukatoa's Avatar
sukatoa sukatoa is offline
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 509
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Thanks rjuyal

@OP, Just a quick....

When optimizing such code,
The fastest loop that i've ever read is the while loop that compares the value to zero. second is the boolean.

while( something != 0){ ... }

while( true ){ ... }

Any other process that can just initialize once, put them away from the loop.

Code:
while( something != 0){ Double d = value / ( 3 + 2 * 3); Something executes }
instead,

Code:
Double d; Double t1 = 9.0 ( MDAS rule ) while( something != 0){ d = value / t1; Something executes }
My example really too far from the given codes, but you can get some ideas... ( i hope )
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by sukatoa : 05-09-2008 at 02:26 AM.
Reply With Quote