Any faster searching method?
#1

Hello,
I made a /v command that can spawn vehicles by entering the vehicle model ID/name.
However I find that searching for the vehicle name is so slow that it freezes my server for a while.
Code for searching in my command currently:
pawn Код:
for(new i = 0;i < sizeof(vehiclename);i++)//212 vehicle names
    if(strfind(vehiclename[i],params,true) != -1) break;
I've benchmarked that code and it runs at around 1 time/ms!

Therefore I'd like to know if there's any faster method.
Reply


Messages In This Thread
Any faster searching method? - by leong124 - 28.05.2011, 04:50
Re: Any faster searching method? - by KaleOtter - 28.05.2011, 12:23

Forum Jump:


Users browsing this thread: 2 Guest(s)