Skip to content

Opt performance enhancement #334

Description

@TheMatthew

Hi, I am currently using your lib to parse json logs that can be very large. I was wondering if it would be possible to make opts have an early failure. The reason I am asking is while

try{
return getThing(string);
}catch(exception e){
return defaultValue;
}

is super readable, the throw catch exception is very slow. It would speed things up a lot having a simple check in front of the field to return if there is no field defined from the get go.

Thanks for such a great and easy to use lib.
:)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions