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 #4

Open
lrennels opened this issue Nov 3, 2021 · 0 comments
Open

Performance #4

lrennels opened this issue Nov 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@lrennels
Copy link
Collaborator

lrennels commented Nov 3, 2021

There should be places we can really improve performance, but ideally we would maintain the flexibility for countries and time, while also speeding things up. Some steps might be:

  • remove use of unique
  • remove use of Query looping functions like @filter
  • run Profiler for type stability

For example, it may be faster to move away from DataFrames and Query to use lower-level indexing methods like replacing

 subset = g_ssp_datasets[ssp_dict_key] |>
            @filter(_.year == gettime(t) && _.country in p.country_names) |>
            DataFrame

with something like (pseudocode)

yr_idxs = g_ssp_datasets[ssp_dict_key].year == gettime(t) # Bit Vector
country_idxs = indexin(g_ssp_datasets[ssp_dict_key]. country,  p.country_names) # Vector of Ints

and then use those to pare down to the subset, or are those also slow?

@lrennels lrennels added the enhancement New feature or request label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant