Optimizations to R ETL process (esp. loading).#4
Open
concretevitamin wants to merge 1 commit intomitdbg:masterfrom
Open
Optimizations to R ETL process (esp. loading).#4concretevitamin wants to merge 1 commit intomitdbg:masterfrom
concretevitamin wants to merge 1 commit intomitdbg:masterfrom
Conversation
- Directly reads from .txt file instead of saving out to .Rdata first then reading back again. Prototyped for Regression. - Even if the .Rdata step is desired, using fread() has much better performance.
Collaborator
|
Sorry this slipped through the cracks and I am only looking at this now. Thanks for submitting your code! Regarding the changes to vanilla_R_benchmark.R, I have done a bit of testing on the 5000x5000 dataset, and it seems that load() on a binary file is faster than fread() on a text file (6.5 seconds v. 11.8 seconds). Under what conditions did you find fread() to be faster? Regarding the changes to generate_Rdata.R, fread() is certainly faster than read.csv(), but it seems to leave the data in a format that doesn't work with the code in vanilla_R_benchmark.R. I haven't done much debugging, but if you have any ideas I'd definitely appreciate them! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
then reading back again. Prototyped for Regression.
performance.
I've found this to be much more efficient for benchmarking (tested on an EC2 instance). If this approach looks good, I could certainly make corresponding changes for all queries.