-
Notifications
You must be signed in to change notification settings - Fork 1
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
Performance optimizations #16
Labels
Milestone
Comments
Just added cache for reflected fields, and performance is up from 11590 ns/op to 4324 ns/op and from 88 allocs/op to 26 allocs/op. Lookin' good!
|
typerandom
added a commit
that referenced
this issue
May 14, 2015
Improved memory use slightly by changing the way that errors were created.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Up until now focus have been on API design and features and not on performance/memory usage. So as you can see in the benchmark below, the library is currently outperformed by it's competitors (Edit: Worth nothing that this is no longer the case. See latest bench in comments.). Though this should not be that hard to fix.
Things I know that are unnecessarily expensive:
Parsing structure tags - Could easily be cached.(implemented)validate
tag. Of course, worsens user experience.Another optimization that could be done is to build a validation graph for each structure type so that one would not have to walk the whole struct graph all of the time.
The text was updated successfully, but these errors were encountered: