Created
July 31, 2012 14:16
-
-
Save fmder/3217326 to your computer and use it in GitHub Desktop.
Scoop test with a huge tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scoop.futures import map | |
def root(): | |
for _ in range(100): | |
r = list(map(node, [range(1000)] * 100)) | |
def node(data): | |
for _ in range(5): | |
r1 = sum(map(leaf, [range(1000)] * 10)) | |
r2 = sum(map(leaf, [range(1000)] * 10)) | |
return r1 + r2 | |
def leaf(data): | |
return sum(data) | |
if __name__ == "__main__": | |
root() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment