Compare benchmarks to some goplayground validator benchmarks#6
Open
awalterschulze wants to merge 3 commits intomasterfrom
Open
Compare benchmarks to some goplayground validator benchmarks#6awalterschulze wants to merge 3 commits intomasterfrom
awalterschulze wants to merge 3 commits intomasterfrom
Conversation
Member
Author
|
Maybe its plausible to convert govalidator structs with their tags into relapse expressions to still have the ease of use of structs tags and the speed of relapse. The reflect parser is a proof of concept at the moment and will need to be matured, but this will be easy and happen naturally given all the test cases from govalidator. |
|
Yo that would be awesome if we can tags and that speed ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Katydid benchmarks ran with
Govalidator benchmarks ran with
GoValidator
BenchmarkStructLevelValidationSuccess 219 ns/op
BenchmarkStructSimpleSuccess 263 ns/op
BenchmarkStructComplexSuccess 1504 ns/op
BenchmarkStructComplexFailure 7585 ns/op
Katydid Relapse
BenchmarkStructLevelValidationSuccess 132 ns/op
BenchmarkStructSimpleSuccess 155 ns/op
BenchmarkStructComplexSuccess 444 ns/op
BenchmarkStructComplexFailure 414 ns/op
Optimized Katydid Relapse
BenchmarkStructComplexSuccess 132 ns/op
BenchmarkStructComplexFailure 129 ns/op
Disclaimer: I did take some shortcuts on BenchmarkStructComplexSuccess and BenchmarkStructComplexFailure by not including the last two fields.