mIRC Home    About    Download    Register    News    Help

Print Thread
/hload -m (and more) #261585 20/10/17 05:36 AM
Joined: Feb 2003
Posts: 2,743
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,743
Could you add -m to /hload, please. Thanks! smile

Could you give the universal hash table -m switch an N parameter to specify the "table size"? ie, /hadd -m1000 table item data and /hinc -m1000 table item 1

What is the default "table size" these days when using /hmake or the -m switch?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: /hload -m (and more) [Re: Raccoon] #261588 20/10/17 02:33 PM
Joined: Jul 2006
Posts: 3,748
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,748
/hload -m has been asked many, many times in this forum in the past:
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/232163/
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/181278/
https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/143264/

Still an idea I support, I don't like your /hadd suggestion though.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /hload -m (and more) [Re: Wims] #261633 29/10/17 09:54 PM
Joined: Apr 2003
Posts: 342
M
MeStinkBAD Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
I believe the default hash table size is 100 slots. Regardless of the number of slots you may store unlimited items. Though the help file claims that more slots the better the performance I've never seen a noticeable speed difference with a hash table with a 100 slots versus one with 10,000.


Beware of MeStinkBAD! He knows more than he actually does!
Re: /hload -m (and more) [Re: MeStinkBAD] #261637 31/10/17 01:42 AM
Joined: Feb 2003
Posts: 2,743
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,743
When working with "effing gigantic" tables, I believe the rule of thumb should be to set as many slots as $sqrt(items) aka $calc(items^(1/2)). I have one table that approaches a million items, geoip address ranges, so 1000 is a better value for /hmake.

If you know for sure that your table will only contain 100 items, then set it to 10. If it'll only contain 50 items, then set it to 7 to save a few processor cycles.

It's certainly not that big of an issue, I just recommended -m[N] for convenience of coding. /hmake is almost -never- used unless you are loading a table from file, and for that /hload -m[N] could be made a convenient option.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!