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

Port ergm.allstats() C backend to use khash. #540

Open
krivit opened this issue Oct 5, 2023 · 4 comments
Open

Port ergm.allstats() C backend to use khash. #540

krivit opened this issue Oct 5, 2023 · 4 comments

Comments

@krivit
Copy link
Member

krivit commented Oct 5, 2023

This will reduce code repetition and also mean that the maximum number of distinct statistics no longer needs to be specified.

This API change may affect ergmito.

@mbojan
Copy link
Member

mbojan commented Oct 7, 2023

CC @gvegayon

@gvegayon
Copy link

gvegayon commented Oct 18, 2023

Interesting, @krivit and @mbojan. I was looking around, and I couldn't find many references on the performance of this hashing library. (there is one here) Have you run any benchmarks to check how much faster this is? Also, I have been playing a lot with Intel's Advisor, and it is a fantastic tool for optimization (I've used it with R packages and C++ code.) ergm is already pretty fast, still, I wonder if you have checked the code using anything like that.

@krivit
Copy link
Member Author

krivit commented Oct 19, 2023

We haven't, and it would be an interesting project. I chose khash based on those benchmarks, but also because it satisfied a number of requirements:

  1. plain C implementation
  2. arbitrary data types for keys and values
  3. incorporated directly into source: no external libraries required

gvegayon added a commit to gvegayon/ergm-oneapi that referenced this issue Oct 23, 2023
@gvegayon
Copy link

gvegayon commented Oct 23, 2023

This would be a great project, IMHO! I've created an example repo with some outputs from Intel's Advisor. I am happy to collaborate or provide more info/guidance if you are interested.

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

3 participants