The associative array ("hash") functionality in Galacticus is extremely simplistic - it is not optimized in any way. Given that we don't currently use it for any case where the number of entries becomes large this may not be a huge problem. But, better options do exist, for example libcdict which might be easy to use (with some suitable wrappers).