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

Binning inefficiency #2

Open
jvansanten opened this issue Sep 28, 2016 · 0 comments
Open

Binning inefficiency #2

jvansanten opened this issue Sep 28, 2016 · 0 comments
Assignees

Comments

@jvansanten
Copy link

jvansanten commented Sep 28, 2016

Dashi histograms drop down to numpy.histogramdd() on every call to fill(). For histograms with a large number of bins, this creates two inefficiencies:

  1. Bin indices are found by binary search, when they're usually uniform under some transformation (i.e. linear or log)
  2. A copy of the bin content array is created afresh on every call. Repeated calls to fill() would be much more efficient if bin content were added in place.

Things to do:

  1. Create a binning object that implements the index calculation
  2. Make these manipulable in the same way as bin edges (rebinning, slicing, etc)
  3. Serialize and deserialize to HDF5 files
  4. Reimplement fill() in terms of index calculation
@jvansanten jvansanten self-assigned this Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant