mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 30
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Jan 2003
Posts: 30
Would it be faster to have one large hash table for all my settings for several smaller ones?

Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Just a guess, but several smaller ones, so that the time to lookup a value is short (doesn't have to look though as many entries to find it)


NaquadaBomb
www.mirc-dll.com
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
I agree with NaquadaServ, better to split each set of values into individual hash tables, then they can be accessed much quicker.


billythekid
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
For questions of this type, why not test it yourself? Write yourself a script that does both. One script uses several small hash tables and another script that uses a much larger one. The same exact script should be used to compare ... everything needs to be as much the same as possible so you don't inadvertantly try to test too many things at once. (Also, bear in mind that the OS will still necessarily be running, so this is only rudimentary profiling, at best, but you can minimize even those differences by closing down any processes not completely necessary to running the main OS and then rebooting when you're done testing to restart everything normally.)

In your profiling script, set a variable = $ticks to start the timer.

Do a loop that does the same operations 10000 times or more per test run. The longer the test, the more "normalized" your results will be. They will still vary, though; so, you will probably want to do several test runs for both methods.

At the end of each test, echo out $ticks - your stored $ticks value.

Close down all non-essential process including disconnecting mIRC (but not exiting) and start the test run.

Reboot to get back to normal.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard