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

Improving gamma.R funs #77

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

jw2249a
Copy link

@jw2249a jw2249a commented Dec 26, 2023

importing collapse::qF for the quick creation of factors. Then refactoring gamma funs to use those factors and references to decrease the number of parallel calls and memory pressure. This improves performance quite a bit

@jw2249a jw2249a changed the title Improving gamma Improving gamma.R funs Dec 26, 2023
@jw2249a
Copy link
Author

jw2249a commented Dec 26, 2023

My benchmark was with first names from two datasets (one voter file and another list). I tested with exponentially larger sets and the speed and memory usage was especially noticeable on the expensive gammaCKpar.R files.

One addition is that matrices are often used instead of vectors. In my most main branch the cpp file doesn't have matrices as input. I don't know if multidimensional vars were considered at one point, but there are a bunch of calls and coercion to form these that can be removed.

@tedenamorado
Copy link
Collaborator

Thanks so much for sharing this with us @jw2249a! This is fantastic! I am checking the new functions as we speak. I will report back soon.

Re matrices vs vectors: your intuition is correct. We left the door open for linkage fields that could be compared in more complex ways.

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.

2 participants