-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Unmarshalers using generics to replace Decoder.Register
This greatly improves performance of custom unmarshaler functions by removing the need to call reflect.Call. benchmark old ns/op new ns/op delta BenchmarkDecode/register-8 302 51.7 -82.91% benchmark old allocs new allocs delta BenchmarkDecode/register-8 5 2 -60.00% benchmark old bytes new bytes delta BenchmarkDecode/register-8 80 16 -80.00% Decoder.Register is now deprecated in favor of Decoder.WithUnmarshalers. This change requires Go1.18
- Loading branch information
Showing
5 changed files
with
514 additions
and
276 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.