mIRC Home    About    Download    Register    News    Help

Print Thread
#261585 20/10/17 05:36 AM
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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!
Joined: Jul 2006
Posts: 4,144
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,144
/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.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2003
Posts: 342
M
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!
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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!

Link Copied to Clipboard