3 ms·
I wrote a follow up in my blog (too long to post here) optimising a little more https://wrongsideofmemphis.wordpress.com/2015/05/08/optimise-python-with-closure
by jaimebuelta 11y ago
I wrote a follow up in my blog (too long to post here) optimising a little more https://wrongsideofmemphis.wordpress.com/2015/05/08/optimise-python-with-closures/ https://wrongsideofmemphis.wordpress.com/2015/05/08/optimise...
- masklinn 11y agoYou could get a last slight bit of juice from localising the closed over variables by binding them as default parameters e.g. def whitelist_filter(bid_request): return not categories.isdisjoint(bid_request["categories"]) to def whitelist_filter(bid_request, categories=categories): return not categories.isdisjoint(bid_request["categories"])