Which one do you prefer to use?
First code
100.00%
2
Second code
0%
0
2 vote(s)
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Optimization in pawno.
#1
Lightbulb 
Hello. I am still new at pawno. Could you tell me which one is more efficient from these code? These code has the same purpose.



First Code

Code:
forward test();

public test();

{

? ? new rows;

? ? for(new i = 0; i < rows; i) {

? ? ? ? new string[128];

? ? ? ? format(string, sizeof string, "%d is printed.", i);

? ? ? ? SendClientMessage(0, 0xFFFFFFFF, string);

? ? }

}



Second Code

Code:
forward test();

public test();

{

? ? new rows;

? ? new string[128];

? ? for(new i = 0; i < rows; i) {

? ? ? ? format(string, sizeof string, "%d is printed.", i);

? ? ? ? SendClientMessage(0, 0xFFFFFFFF, string);

? ? }

}
  Reply


Messages In This Thread
Optimization in pawno. - by AsteriskRin - 2020-12-03, 04:34 AM
RE: Optimization in pawno. - by Awide - 2020-12-03, 04:31 PM
RE: Optimization in pawno. - by Pinch - 2020-12-03, 06:12 PM
RE: Optimization in pawno. - by Kwarde - 2020-12-04, 07:56 PM
RE: Optimization in pawno. - by gzxmx94 - 2020-12-07, 10:12 AM

Forum Jump: