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

Use dot product for containment #306

Merged
merged 9 commits into from
Jan 2, 2024
Merged

Use dot product for containment #306

merged 9 commits into from
Jan 2, 2024

Conversation

dcherian
Copy link
Collaborator

@dcherian dcherian commented Dec 31, 2023

Closes #304

A regression for one test case, I think because I am currently re-iterating over all labels instead of over known cohorts, and then merging those.

| Before [ce89b381] <main>   | After [4c1fb7aa] <dotproduct>   |   Ratio | Benchmark (Parameter)                                  |
|----------------------------|---------------------------------|---------|--------------------------------------------------------|
| 2.37±0.01ms                | 4.03±0.02ms                     |    1.7  | cohorts.ERA5MonthHour.time_find_group_cohorts          |
| 2.68±0.05ms                | 4.32±0.02ms                     |    1.61 | cohorts.ERA5MonthHourRechunked.time_find_group_cohorts |
| 8.30±0.06ms                | 12.6±0.04ms                     |    1.52 | cohorts.ERA5MonthHourRechunked.time_graph_construct    |
| 7.99±0.02ms                | 12.0±0.07ms                     |    1.51 | cohorts.ERA5MonthHour.time_graph_construct             |
| 2.35±0.01ms                | 2.84±0.01ms                     |    1.21 | cohorts.PerfectMonthly.time_graph_construct            |
| 17.6±0.1ms                 | 19.6±0.1ms                      |    1.11 | cohorts.ERA5Google.time_graph_construct                |
| 2.89±0.01ms                | 2.62±0ms                        |    0.91 | cohorts.ERA5Google.time_find_group_cohorts             |
| 723±2μs                    | 625±4μs                         |    0.86 | cohorts.PerfectMonthly.time_find_group_cohorts         |
| 40.0±0.2ms                 | 15.4±0.05ms                     |    0.38 | cohorts.NWMMidwest.time_find_group_cohorts             |
| 11.4±0.06ms                | 3.10±0.01ms                     |    0.27 | cohorts.ERA5DayOfYear.time_find_group_cohorts          |

@dcherian dcherian merged commit 15abf49 into main Jan 2, 2024
18 of 19 checks passed
@dcherian dcherian deleted the dotproduct branch January 2, 2024 16:02
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