Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Why faster until 50k to 500k rows? #2

Open
bscully27 opened this issue Mar 25, 2020 · 1 comment
Open

Question: Why faster until 50k to 500k rows? #2

bscully27 opened this issue Mar 25, 2020 · 1 comment

Comments

@bscully27
Copy link

For most pandas functions, I expected numpy to outperform regardless of data size.
I'm curious about the technical details behind this observation. Any information would be appreciated.

Thanks!

@yash-clear
Copy link

@bscully27 > For most pandas functions, I expected numpy to outperform regardless of data size.

I'm curious about the technical details behind this observation. Any information would be appreciated.

Thanks!

Numpy is the fastest because it is C-compiled and stores data of same datatype (homogeneous arrays) and you get the benefits of principle of locality i.e., tendency of a processor to access the same set of memory locations repetitively over a short period of time. On the other hand pandas are flexible to store data of many datatypes which in turn decrease its performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants