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

Incorrect benchmark of numpy and arrow backends #37

Open
tdpetrou opened this issue Apr 6, 2023 · 0 comments
Open

Incorrect benchmark of numpy and arrow backends #37

tdpetrou opened this issue Apr 6, 2023 · 0 comments

Comments

@tdpetrou
Copy link

tdpetrou commented Apr 6, 2023

There are a couple issues in this notebook that you can change to provide a better comparison between numpy and arrow. Most importantly, you need to make the numpy array a fortran array with:

np.asfortranarray(numbers)

Next, when summing with numbers.sum(), you are summing over both axes. It sums every value in each axis producing a single result. You need to do comparisons across each axis numbers.sum(axis=0) and numbers.sum(axis=1). You will see that arrow is 1000x slower when summing across the horizontal axis.

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

1 participant