Skip to content

Instantly share code, notes, and snippets.

@schmohlio
Created May 25, 2014 01:14
Show Gist options
  • Save schmohlio/e4f4890dfbdecacbf4cf to your computer and use it in GitHub Desktop.
Save schmohlio/e4f4890dfbdecacbf4cf to your computer and use it in GitHub Desktop.
test EmbeddedFucntionHandler 1
import numpy as np
from multiprocessing import Pool
def add_one(x):
return x+1
p = Pool(4)
l = np.arange(0,1000000)
%timeit p.map(add_one, l)
# 1 loops, best of 3: 887 ms per loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment