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

Performance without numpy #23

Open
pirovc opened this issue Jul 6, 2021 · 6 comments
Open

Performance without numpy #23

pirovc opened this issue Jul 6, 2021 · 6 comments

Comments

@pirovc
Copy link

pirovc commented Jul 6, 2021

Hi @benmaier Thanks for keep improving the package. I noticed you removed numpy in the latest release. Do you know if that will impact the performance of the packing? I use it with very large datasets and would like to get a feeling before updating.

@benmaier
Copy link
Owner

benmaier commented Jul 6, 2021

hi, in my tests it affected runtimes by an increase of 10%. I decided to get rid of numpy to make the package pure-Python and therefore more lightweight. Would you have time to run some tests? if performance is too bad for you we could add the numpy-dependence back to an extra submodule

@benmaier
Copy link
Owner

benmaier commented Jul 6, 2021

I'm also realizing that this package had an increase in usage over the last years, so I should probably start adding community guidelines and discuss major changes with some core people before pushing.

@pirovc
Copy link
Author

pirovc commented Jul 6, 2021

Sure I will do some tests and post here once I have some time. Since you already notice an increase I guess I will keep on the older version for now (1.1.1) because it works just fine to me.

I think keeping it pure-python is always a good thing, makes things easier to install and give support.

@benmaier
Copy link
Owner

benmaier commented Jul 6, 2021

you might want to consider switching to a newer version where some bugs caused by edge cases were fixed by contributors. v1.4.5 is the last version that used numpy

@benmaier
Copy link
Owner

What do you think of a solution where the "numpy" versions of the routines are imported at runtime per default but if the import fails, the package falls back on the pure python-solutions?

@pirovc
Copy link
Author

pirovc commented Sep 16, 2022

Sounds like a nice solution if not too problematic or ugly to implement. In reality I do not actively use binpacking anymore, so this is not a problem for me at the moment (not related to the performance, just don't need the routine anymore). However I can see many applications where performance is important, so +1 to the idea.

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