Well,

you were right about the -o thing not working properly, because there was no topic. I do think that is a bit odd, since what should it matter what structure the file is in right now, before saving, if it's going to be overwritten entirely anyway? Though, it's reasonable I suppose.

I went ahead and modified the alias, to make it write a section, which was basically just add a line ".fwrite -n test [hashtable]". Now it resembled the exact same as if you would /hsave -i the hash table to a brand new textfile (note I'm saying new file)

After that I loaded the text file with /hload -i test test.txt. I performed some commands like $readini, and /writeini on the file, and everything worked fine.

The benchmarks returned the exact same results, that is 63 ms for /save2 and 328 ms for /save1.

Now, I understand what you are saying. The reason the /hsave -i is slower, in this particular case, because it has to check for existing topics, etc., take into account the format and structure of INI files. That would make sense, that it would be slower than using a loop and fwrite, since my alias doesn't have to check the structure, it simply overwrites the file without looking back (which I first thought /hsave -oi would also do, cuz of the o flag)

I can conclude (I think), that for my purpose, which is temp storing player data with the intention to use /filter on it to return top statistics, my alias will be best suited.

If I were to have to write to a file, which has several topics, and cannot be overwritten as a whole, then the /hsave -i solution would then be fastest, as the difference is that it supports true INI support, where my alias doesn't (limited to having 1 topic in a file, and only overwriting).

Well, thanks for the info, it makes sense.

Greets

Last edited by FiberOPtics; 11/11/04 09:05 PM.