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

Doc: Benchmark #215

Open
c1pyerten opened this issue Jun 23, 2023 · 2 comments
Open

Doc: Benchmark #215

c1pyerten opened this issue Jun 23, 2023 · 2 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@c1pyerten
Copy link

Add benchmark comparison with github.com/go-playground/validator

@inhere inhere added the question Further information is requested label Jun 24, 2023
@iambudi
Copy link

iambudi commented Jul 25, 2023

Is there a tips to make validate.Struct() perform faster? My API Req/Sec drops 47% to validate required for 3 struct fields.

@inhere inhere added the help wanted Extra attention is needed label Jul 26, 2023
@inhere
Copy link
Member

inhere commented Jul 29, 2023

Here is a test report provided by others: https://github.com/StrayDragon/benchmark-validate-go

Performance optimization is still planned:

  • Create Validation in a lighter way. eg: sync.Pool
  • The reflect.Type of the cache structure
  • The reflect.Type of the cache structure field
  • Avoid multiple use of reflect.ValueOf() on the same value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants