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

Speed up combining dataframes #3

Open
henry-ngo opened this issue Aug 7, 2020 · 0 comments
Open

Speed up combining dataframes #3

henry-ngo opened this issue Aug 7, 2020 · 0 comments

Comments

@henry-ngo
Copy link
Collaborator

In these lines of step_simulation() we use rbind to combine the data frame of existing cases with the data frame for new cases. This happens at least once in almost every time step and is potentially a major bottleneck in terms of speed.

Pre-allocating a large data frame, matrix or list would speed things up, however, that would require some adjustments throughout the package as the state_df data frame has rows removed as well as added. This requires a bit more effort and will be a goal for the next major release.

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

No branches or pull requests

1 participant