Information générale
Catégorie:
Codage, syntaxe et commandes
>I think the difference is that strtofile is opening and closing the file in each iteration while fwrite opens the file outside the loop and closes it once the loop finishes, if you move the fopen and fclose inside the loop, then it is a little slower than strtofile in my computer (1.270 vs 1276), almost the same
I was going to post that originally because I figured that's what it was doing, but when I tried to verify it on my computer I got results of about 2.5 seconds for FOPEN() FWRITE() FCLOSE(), and about 7 seconds for STRTOFILE(). So I figured it was doing something more. However, in testing just now by re-writing the previous test anew I find they're both around 7 seconds. Maybe I had written the first test incorrectly.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement