If Statements x &&
#5

Thank you.

Test it, please:

pawn Код:
#include a_samp

#define START_BENCH(%0); {new __a=%0,__b=0,__c,__d=GetTickCount(),__e=1;do{}\
while(__d==GetTickCount());__c=GetTickCount();__d= __c;while(__c-__d<__a||\
__e){if(__e){if(__c-__d>=__a){__e=0;__c=GetTickCount();do{}while(__c==\
GetTickCount());__c=GetTickCount();__d=__c;__b=0;} }{


#define FINISH_BENCH(%0); }__b++;__c=GetTickCount();}printf(" Bench for "\
%0": executes, by average, %.2f times/ms.",floatdiv(__b,__a));}


main()
{
    new f = 0;
    new t = 1;

    START_BENCH(1000);
    if(t && f) {}
    if(f && t) {}
    FINISH_BENCH("2");

    START_BENCH(1000);
    if(t) if(f) {}
    if(f) if(t) {}
    FINISH_BENCH("1");
   
}

/*
[16:11:55]  Bench for 2: executes, by average, 3445.79 times/ms.
[16:11:57]  Bench for 1: executes, by average, 4688.54 times/ms.
*/
Reply


Messages In This Thread
If Statements x && - by ipsBruno - 01.05.2012, 18:29
Re: If Statements x && - by iRemix - 01.05.2012, 18:34
Respuesta: Re: If Statements x && - by ipsBruno - 01.05.2012, 18:37
Re: If Statements x && - by Kaczmi - 01.05.2012, 18:56
Respuesta: If Statements x && - by ipsBruno - 01.05.2012, 19:00
Re: If Statements x && - by zSuYaNw - 01.05.2012, 19:08
Re: If Statements x && - by steki. - 01.05.2012, 19:13
Respuesta: If Statements x && - by ipsBruno - 01.05.2012, 19:18

Forum Jump:


Users browsing this thread: 6 Guest(s)