|
-
March 2nd, 2004, 04:20 AM
#1
performance in switch
Hello ,
I have a switch case statement .. as below
switch(data)
{
case 1:
.....
break;
case 2:
.....
break;
case 3:
.....
break;
default:
.....
break;
}
my data will be 2 ,70 % of times
or 1, 20 % of times
or 3 , 10 % of times ,
so if i change the order as below ,will it increase the performance ??
switch(data)
{
case 2:
.....
break;
case 3:
.....
break;
case 1:
.....
break;
default:
.....
break;
}
 sivakumar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|