08.09.2010, 23:56
pawn Код:
new
idx;
for(new i; i < 1000000; i++)
{
Integer = strval(strtok(TESTSTRING, idx));
}
idx is passed as a reference parameter to strtok, meaning that after your first call to strtok it will search from a different place; whereas on the other hand sscanf is still searching from the beginning. You'd probably find after x or so loops that strtok is not getting the value you're expecting, you should reset idx to 0 after each iteration.
Is this a fair test or have I missed something?