http://qs321.pair.com?node_id=1215553


in reply to Re^2: A more elegant way to filter a nested hash?
in thread A more elegant way to filter a nested hash?

The biggest savings is the call stack. In general, the overhead involved in moving into and out of subroutines is not negligible -- profile if you need to know the cost in your particular scenario. Iterative solutions with work queues can also be much more intelligible and may scope to your data more elegantly.

However, from a true optimization perspective, if it runs and if it's documented, your effort is likely better spent improving a different chunk of code rather than worrying about aesthetics.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.