Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark Oj::Parser in a thread safe way #703

Merged
merged 1 commit into from
Nov 8, 2024

Commits on Nov 8, 2024

  1. 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.
    byroot committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    855563f View commit details
    Browse the repository at this point in the history