Created
May 25, 2014 01:14
-
-
Save schmohlio/e4f4890dfbdecacbf4cf to your computer and use it in GitHub Desktop.
test EmbeddedFucntionHandler 1
This file contains hidden or 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
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