mIRC Homepage
Posted By: Raccoon /hload -m (and more) - 20/10/17 05:36 AM
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?
Posted By: Wims Re: /hload -m (and more) - 20/10/17 02:33 PM
/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.
Posted By: MeStinkBAD Re: /hload -m (and more) - 29/10/17 09:54 PM
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.
Posted By: Raccoon Re: /hload -m (and more) - 31/10/17 01:42 AM
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.
© mIRC Discussion Forums