I have a 428MB tsv file with 44 columns and 1,306,197 rows. According to the benchmark, vroom()
should read this file into R much faster than read_tsv()
. However, my benchmark results consistently show that vroom()
is actually much slower than read_tsv()
. Below is the actual R code I used for benchmarking.
library(tidyverse)
library(vroom)
library(microbenchmark)
microbenchmark({test = vroom("path/to/tsv", delim = "\t", col_names = T, trim_ws = T)})
# mean 658.7998 median 629.4985
microbenchmark({test = read_tsv("path/to/tsv", col_names = T, trim_ws = T)})
# mean 10.13749 median 10.06836
What could be the reason?