[Benchmark] strpack vs format
#1

I made a quick benchmark script to see which was faster, just sharing them here for the record:
pawn Код:
#include <a_samp>

main()
{
    new
        StartTick,
        StopTick,
        string[16],
        string2[16];
       
    format(string2, 17, "I like big butts");
    StartTick = GetTickCount();
    for(new i; i < 1000000; i++)
    {
        format(string, 17, string2);
    }
    StopTick = GetTickCount();
    printf("format: %d ms", StopTick-StartTick);
    for(new i; i < 1000000; i++)
    {
        strpack(string, string2, 17);
    }
    StopTick = GetTickCount();
    printf("strpack: %d ms", StopTick-StartTick);
    return 1;
}
Result:
[21:40:19] format: 351 ms
[21:40:19] strpack: 524 ms

Conclusion: format is faster.
Reply


Messages In This Thread
[Benchmark] strpack vs format - by Lenny the Cup - 05.04.2011, 19:46
Re: [Benchmark] strpack vs format - by WackoX - 05.04.2011, 19:49
Re: [Benchmark] strpack vs format - by Placebo - 05.04.2011, 19:50
Re: [Benchmark] strpack vs format - by randomkid88 - 05.04.2011, 20:20
Re: [Benchmark] strpack vs format - by Lenny the Cup - 05.04.2011, 20:38
AW: [Benchmark] strpack vs format - by Nero_3D - 05.04.2011, 20:43
Re: AW: [Benchmark] strpack vs format - by randomkid88 - 05.04.2011, 20:55
Re: [Benchmark] strpack vs format - by Lenny the Cup - 05.04.2011, 21:13
AW: [Benchmark] strpack vs format - by Nero_3D - 05.04.2011, 21:38

Forum Jump:


Users browsing this thread: 1 Guest(s)