rreadrvroom

Performant implementation of function for converting data.frame to delimited string in R


I am looking for a fast serialization function to convert a data.frame to a delimited string in R. At the moment I am using readr::format_tsv (Versions readr_2.0.0 vroom_1.5.3) for the conversion and I am wondering if there is a faster implementation available. For the example below the conversion takes around 4.4 seconds which is too slow for my purpose.

system.time()

   user  system elapsed 
  3.878   0.495   4.372 

Example

df= data.frame(replicate(400, runif(35000, min=0, max=100)))

system.time({
  tsv = readr::format_tsv(df)
})

Solution

  • The performance issue got resolved: https://github.com/r-lib/vroom/issues/377