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

method heuristics: Avoid dot product as much as possible #347

Merged
merged 6 commits into from
Mar 27, 2024

Conversation

dcherian
Copy link
Collaborator

@dcherian dcherian commented Mar 26, 2024

Spotted another possible optimization

xref #346

Annoyingly asv is broken and not running now but in a notebook:
image

Even better now since we can use sparsity(bitmask) as a proxy instead of sparsity(containment) This avoids an expensive sparse matrix dot product when bitmask isn't particularly sparse:

image

@dcherian dcherian force-pushed the optimize-cohorts-again branch from 08d6ead to 6a2c386 Compare March 27, 2024 03:08
@dcherian dcherian changed the title Another method detection optimization method heuristics: Avoid dot product as much as possible Mar 27, 2024
@dcherian dcherian enabled auto-merge (squash) March 27, 2024 03:20
@dcherian dcherian merged commit 4952fe9 into main Mar 27, 2024
18 checks passed
@dcherian dcherian deleted the optimize-cohorts-again branch March 27, 2024 03:52
dcherian added a commit that referenced this pull request May 2, 2024
* main: (64 commits)
  import `normalize_axis_index` from `numpy.lib` on `numpy>=2` (#364)
  Optimize `min_count` when `expected_groups` is not provided. (#236)
  Use threadpool for finding labels in chunk (#327)
  Manually fuse reindexing intermediates with blockwise reduction for cohorts. (#300)
  Bump codecov/codecov-action from 4.1.1 to 4.3.1 (#362)
  Add cubed notebook for hourly climatology example using "map-reduce" method (#356)
  Optimize bitmask finding for chunk size 1 and single chunk cases (#360)
  Edits to climatology doc (#361)
  Fix benchmarks (#358)
  Trim CI (#355)
  [pre-commit.ci] pre-commit autoupdate (#350)
  Initial minimal working Cubed example for "map-reduce" (#352)
  Bump codecov/codecov-action from 4.1.0 to 4.1.1 (#349)
  `method` heuristics: Avoid dot product as much as possible (#347)
  Fix nanlen with strings (#344)
  Fix direct quantile reduction (#343)
  Fix upstream-dev CI, silence warnings (#341)
  Bump codecov/codecov-action from 4.0.0 to 4.1.0 (#338)
  Fix direct reductions of Xarray objects (#339)
  Test with py3.12 (#336)
  ...
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

Successfully merging this pull request may close these issues.

1 participant