mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 24
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Dec 2002
Posts: 24
i have heard a lot of bashing on ini files... they seem to really suck, lol. also, variables are not a good place for anything that i would consider remotely permanent. hash tables are not good for that either... but it can be done.

what i was truely wondering is which is truely the fastest? i was building a bot, and i am now in the process of switching it all over to hash tables... because i heard they are much faster.

now, that is no problem -- i still keep all of my permanent information in ini files, but i load it into hash tables for use, so it does not bog down the script so much. then when anything is edited, it's done with the ini files as well as hash tables... etc.

i tried a script that was for calculating your PC speed. really basic scripting, but it got me thinking.

i used the original script, which used %vars, and then i made one myself for testing that used /hmake and /hdel and all that. well, the %var one went about 2x faster than the hash tables one did. but, i thought that hash tables were the fastest because they were loaded into the ram?

i dont know, but it would be nice if someone could say in which order these are as compaired to speed, as the help file really does not touch base on this.

%var, &binvar, hash tables, ini files, text files, any other method of storage i might not know about...

if someone could help me out here, i'd like to know which are truely the fastest. this information will help me to optimize the scripts i write.

tnx

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Hash tables are the fastest way but only last for as long as you keep mIRC running. If you close mIRC then all hash tables are lost forever.

Variables are better when you want to store settings for your scripts. .ini files are okay but they are argueably the slowest of the lot. I'm not sure whether that is any slower than global variables though, both read from and write to a text file which is what makes them slow.

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
With a hash table, you can /hsave all your variables before you exit mIRC (or on a regularly schedule)...and /hload them the next time you restart mIRC. smile


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Variables are stored in memory and only written to file when
- mIRC exits (temp %vars set with the -u switch are not written)
- the remote editor is opened/closed.
- /saveini is used

Joined: Jan 2003
Posts: 6
T
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
T
Joined: Jan 2003
Posts: 6
i get the message
"* /set: line too long (line 6, script1.ini)"
or
"* /hadd: line too long (line 9, script1.ini)"

so is there any method that can store more bytes than variables or hash tables?

i even get
"* /write: line too long (line 11, script1.ini)"

frown confused frown

Last edited by Thanatos6K; 10/01/03 05:27 PM.

webchat.freenet.de - #Olymp
(Thanatos, Katzi`s_Kater)

Link Copied to Clipboard