Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- from numba import jit
- test_iter = 1000000
- @jit(nopython=True)
- def jit_calc(a,b,it):
- l = []
- s = 0
- for i in range(it):
- s += a
- l.append(s)
- return l
- def main():
- print 'start'
- d = jit_calc(1,2, 1)
- t = time.time()
- l = len(jit_calc(10, 2 ,test_iter))
- print time.time() - t
- print l
- if __name__ == '__main__':
- main()
- """
- for yield 2x
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement