processor time
-
-
Which one takes more processing time a. contineous if condition or switch case in while loop . e.g. while(conditon) { switch(conditon) { case contion : } codition++ } or if(condition) { } if(condition) {} if(codition) {}.... and so ono... Thanks
No idea and even if I could give you an idea it'd only be for the compiler (including settings) I tested it on and running the code on the particular configuration of computer/OS I ran it on. If you really want to know then about all you can do is test it on the computer the code's eventually going to run on. Cheers, Ash
-
Which one takes more processing time a. contineous if condition or switch case in while loop . e.g. while(conditon) { switch(conditon) { case contion : } codition++ } or if(condition) { } if(condition) {} if(codition) {}.... and so ono... Thanks
It's called profiling, a dynamic program analysis that every software engineer should know. See if it helps: CProfile - A simple class to do code profiling and tracing[^] /M