Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Benchmark
Oj::Parser
in a thread safe way
The documentation state `Oj::Parser.usual` isn't thread safe: https://github.com/ohler55/oj/blob/c70bf4125b546bc7146840b15de36460d42b4dff/ext/oj/parser.c#L1507-L1513 As such we shouldn't benchark it this way, but instantiate a new parser every time. Technically in real world scenarios you could create a pool of parsers and re-use them, but if it's not provided by the gem, I'm not sure we should go out of our way to do it.
- Loading branch information