15.07.2017, 19:06
(
Последний раз редактировалось Dayrion; 15.07.2017 в 19:55.
)
****** is right but I don't understand the purpose of comparing a lot of strings with this way
PHP код:
main()
{
new count,
MAX_LOOP = 100000,
something;
print("Starting...");
count = GetTickCount();
for(new i; i < MAX_LOOP; i++)
{
switch(YHash("Arrestation"))
{
case _H<Entreprise> : print("Oki");
case _H<Restaurent> : print("Oki");
case _H<Bar> : print("Oki");
case _H<Vehicule> : print("Oki");
case _H<Bar1> : print("Oki");
case _H<Vehicule1> : print("Oki");
case _H<Bar2> : print("Oki");
case _H<Vehicule2> : print("Oki");
case _H<Bar3> : print("Oki");
case _H<Vehicule3> : print("Oki");
case _H<Bar4> : print("Oki");
case _H<Vehicule4> : print("Oki");
case _H<Bar5> : print("Oki");
case _H<Vehicule5> : print("Oki");
case _H<Arrestation> : something++;
}
}
count = GetTickCount() - count;
printf("[1] Finished in %ims", count);
count = GetTickCount();
for(new i; i < MAX_LOOP; i++)
{
if(!strcmp("some_type", "Entreprise"))
print("Oki");
else if(!strcmp("some_type", "Restaurent"))
print("Oki");
else if(!strcmp("some_type", "Bar"))
print("Oki");
else if(!strcmp("some_type", "Vehicule"))
print("Oki");
else if(!strcmp("some_type", "Bar"))
print("Oki");
else if(!strcmp("some_type", "Vehicule"))
print("Oki");
else if(!strcmp("some_type", "Bar"))
print("Oki");
else if(!strcmp("some_type", "Vehicule"))
print("Oki");
else if(!strcmp("some_type", "Bar"))
print("Oki");
else if(!strcmp("some_type", "Vehicule"))
print("Oki");
else if(!strcmp("some_type", "Bar"))
print("Oki");
else if(!strcmp("some_type", "Vehicule"))
print("Oki");
else if(!strcmp("Arrestation", "Arrestation"))
something++;
}
count = GetTickCount() - count;
printf("[2] Finished in %ims", count);
}
Код:
[21:00:16] [1] Finished in 65ms [21:00:16] [2] Finished in 71ms