Skip to content

Instantly share code, notes, and snippets.

@fmder
Created July 31, 2012 14:16
Show Gist options
  • Save fmder/3217326 to your computer and use it in GitHub Desktop.
Save fmder/3217326 to your computer and use it in GitHub Desktop.
Scoop test with a huge tree
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