New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Can python be faster than numpy?
This is my best attempt https://code.sololearn.com/cW3pYAT3cjU0/?ref=app
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.
0
Float nums in first list made it faster, but numpy became faster too