Are numpy arrays faster than generators?(python) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Are numpy arrays faster than generators?(python)

Also which one takes more memory?

14th Jan 2019, 9:47 AM
Juho Pesonen
Juho Pesonen - avatar
1 Answer
+ 2
You can perform speed tests with timeit. timeit.timeit("repeated code", setup="setup", number="number of iterations")
23rd Feb 2019, 10:18 AM
Seb TheS
Seb TheS - avatar