Can python be faster than numpy? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
20th Feb 2021, 1:25 AM
3320
3320 - avatar
2 Answers
+ 3
As the array size increase,Ā NumpyĀ gets around 30 timesĀ faster than PythonĀ List. Because theĀ NumpyĀ array is densely packed in memory due to its homogeneous type, it also frees the memoryĀ faster.
20th Feb 2021, 2:23 AM
Abhiyantā
Abhiyantā - avatar
0
Float nums in first list made it faster, but numpy became faster too
25th Feb 2021, 3:31 AM
3320
3320 - avatar