Last active
July 11, 2022 04:36
-
-
Save hypebright/2183df568ccc0d47b8e961268592264a to your computer and use it in GitHub Desktop.
Microbenchmark to compare reading times for a .csv file in R
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
library(microbenchmark) | |
library(data.table) | |
library(readr) | |
library(vroom) | |
library(iotools) | |
myfile <- 'mypath.csv' | |
microbenchmark(read.csv(myfile), | |
data.table::fread(myfile), | |
readr::read_csv(myfile), | |
vroom::vroom(myfile), | |
iotools::read.csv.raw(myfile), | |
times = 10L | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Results for a 50MB .csv file on my machine: