[Include] Benchmark include
#2

IpsBruno has did something like that..

look

Quote:
Originally Posted by ipsBruno
Посмотреть сообщение
pawn Код:
#define CONT@CONT GetTickCount()


#define TESTS(%0);          { /*esquentar o processador */ for(new uashushua; uashushua != 9990000; uashushua++) {} /* testar o cуdigo */  new testes___@ [666], mMmEDIA;  new j__@; new TTTiem =   CONT@CONT;  for(new i__@; i__@ != 333; ++i__@ ) { j__@=0;testes___@[i__@] = CONT@CONT;for(; j__@ != %0; ++j__@ ) {
#define PROCESSAR();        }testes___@[i__@] = CONT@CONT - testes___@[i__@];mMmEDIA += testes___@[i__@];}mMmEDIA /= (333);new mmMin = cellmax, mMax = 0;for(new aaa_@_teste; aaa_@_teste != 666; aaa_@_teste++) {
#define RESULTADO(%0);      if(mmMin > testes___@[aaa_@_teste]) mmMin = testes___@[aaa_@_teste]; if(mMax < testes___@[aaa_@_teste]) mMax = testes___@[aaa_@_teste];}printf("Resultados para: "#%0" \n\t\n\t Nъmeros de execuзгo a cada milissegundo: %.5f \n\t Tempo mнnimo: %dms  Tempo mбximo: %dms e Tempo mйdio: %dms\n\t Tempo Final: %d milissegundos\n\n",  float((j__@) / (mMmEDIA > 0 ? mMmEDIA : 1))/1000,mmMin, mMax,mMmEDIA,  CONT@CONT - TTTiem);}
and you use like this:
Quote:
Originally Posted by ipsBruno
Посмотреть сообщение
pawn Код:
//

TESTS(333);
// O CУDIGO VAI AQUI
PROCESSAR();
RESULTADO("Nome do cуdigo");
Original Topic: https://sampforum.blast.hk/showthread.php?tid=469273



Nice work Emmet.
Reply


Messages In This Thread
Benchmark include - by Emmet_ - 02.01.2014, 18:36
Re: Benchmark include - by PT - 03.01.2014, 06:57
Re: Benchmark include - by Emmet_ - 03.01.2014, 07:06
Re: Benchmark include - by GiamPy. - 03.01.2014, 12:00
Re: Benchmark include - by Emmet_ - 03.01.2014, 12:13
Re: Benchmark include - by iZN - 04.01.2014, 06:38

Forum Jump:


Users browsing this thread: 3 Guest(s)