Closed copiousfreetime closed 1 year ago
Those results are in line with what I would expect. I am pretty happy with the way the new Parser series worked out. The Oj::Doc defers creating Ruby objects until needed so depending on what it is used for it may much faster or not that impressive.
You might try some of the options on the parsers such as cache_keys and cache_strings.
I was testing benchmarking of Oj on my particular type of json documents to see which one works best for my use case. I'm currently using the
Oj::Doc
parser and wanted to test it against the newOj::Parser
oriented items and came to the surprising find thatOj::Parser.new(:usual)
is almost the same speed asOj::Doc
- althoughOj::Doc
has has a high variability in its runs, and I don't see a compelling case to use saj or scp parsers for my use case.I wanted to make sure of a couple of things am i:
Parser
api correctly?saj
orscp
handler? How did you envision writing a handler that will be reused by the same parser instance?benchmark script
results