Re:The list monad in Perl and Python
by joshcorbin on Tuesday August 04, 2015 @05:18PM
(#10006348)
Further showing the advantage of the pythonic way, is that the above construction remains about as clear when you refactor it for better pruning:
Ends up being several order of magnitudes faster since it partially sums each place and prunes aggressively. You can eliminate the sub-expressions, but it has noise impact on the run time (likely due to trading off temporary tuples for cheap arithmetic):
[ Parent
| on HN ]
There are no comments on this comment yet.