17.09.2011, 16:29
First of all, hashing is not about speed, it's about protecting your users.
For an anti-spam, you would use strcmp to stop people from writing the same thing again. This is not the purpose of hashing.
If you want to benchmark it, then just use GetTickCount above the function and below the function, then subtract the times and you have how long it took for that section of code to complete execution, for example:
For an anti-spam, you would use strcmp to stop people from writing the same thing again. This is not the purpose of hashing.
If you want to benchmark it, then just use GetTickCount above the function and below the function, then subtract the times and you have how long it took for that section of code to complete execution, for example:
pawn Код:
new time;
time = GetTickCount();
// Execute a piece of code
printf("This took %dms to complete", GetTickCount() - time);