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