mIRC Home    About    Download    Register    News    Help

Print Thread
#112299 22/02/05 05:43 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
does it matter wich value you take for N ?
/hmake -s <name> <N>

#112300 22/02/05 05:47 PM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Quote:

/hmake -s <name> <N>
Creates a new hash table with N slots.

A hash table can store an unlimited number of items regardless of the N you choose, however the bigger N is, the faster it will work, depending on the number of items stored.

eg. if you expect that you'll be storing 1000 items in the table, a table of N set to 100 is quite sufficient.

The -s switch makes the command display the result.

#112301 22/02/05 05:53 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I was rightly pointed out by FiberOPtics that N can be anything, if you specify 100 slots, the Hash Table isn't 100 slots big it's prepared to handle atleast 100 items.

Last edited by SladeKraven; 22/02/05 05:53 PM.
#112302 22/02/05 06:13 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
100 slots takes into account 1000 items, but this is no upper limit, the only upper limit is how big your ram is. So it's not because you set slot size 10 that you can't put more than 100 items.


Gone.
#112303 22/02/05 06:26 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Quote:
100 slots takes into account 1000 items, but this is no upper limit, the only upper limit is how big your ram is. So it's not because you set slot size 10 that you can't put more than 100 items.

This was the only usefull reply wink

#112304 22/02/05 06:50 PM
Joined: Mar 2004
Posts: 359
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Quote:

A hash table can store an unlimited number of items regardless of the N you choose, however the bigger N is, the faster it will work, depending on the number of items stored.


That was the key line you should have read, and you didn't have to express yourself saying that either.

#112305 22/02/05 07:51 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
The general rule-of-thumb is: expected maximum number of items in the hash table divided by 10 (to the next highest integer).

If you expect 100 max items, then 100 / 10 = 10 = N.
If you expect 1000 max items, then 1000 / 10 = 100 = N.
If you expect 255 max items, then 251 / 10 = 25.1 rounded up = 26 = N.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#112306 22/02/05 07:52 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
"depending on the number of items stored."
If I understand this clear I would use N=100000 or sth like that to make it fast, which wouldn't be good at all I suppose, this is why I asked more specific help.

I apologise if I offended you, I'm sorry.

Last edited by LethPhaos; 22/02/05 08:09 PM.

Link Copied to Clipboard