Which control structure is faster?
- From: Dimitri Holz <d holz innoventis de>
- To: gtkmm-list gnome org
- Subject: Which control structure is faster?
- Date: Thu, 19 Feb 2009 17:11:25 +0100
Which control structure is faster inside a loop (for, while or do-while)?
1)----------------------------------------------------------
switch(x)
{
case 1:
{
..... ;
break;
}
case 2:
{
.... ;
break;
}
}
2)---------------------------------------------------------
if(x = = 1)
{
........ ;
break;
}
if(x = = 2)
{
........;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]