-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
I did a quick benchmark of speeds of toJSON conversions across packages. Here is the code
library(microbenchmark)
microbenchmark(
jsonlite::toJSON(mtcars),
RJSONIO::toJSON(mtcars),
rjson::toJSON(mtcars),
times = 10
)The results seem to indicate that jsonlite is much slower as compared to the other two packages. Is this because of the more verbose serialization?
Unit: microseconds
expr min lq median uq max neval
jsonlite::toJSON(mtcars) 137884.341 142062.506 145352.0815 150982.395 177053.330 10
RJSONIO::toJSON(mtcars) 1187.170 1280.926 1301.4975 1487.285 2240.849 10
rjson::toJSON(mtcars) 226.272 230.432 271.4605 275.248 325.430 10
mbannertmbannert
Metadata
Metadata
Assignees
Labels
No labels