-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
results: Faster JSON encoding and decoding (#506)
* Add .idea to .gitignore * results: Faster JSON encoding and decoding This commit improves the performance of JSON encoding and decoding of `Results`. Additionally, it fixes a regression introduced in #474 that didn't produce valid JSON for HTTP headers. A test is added that validates the JSON encoding matches the one produced by the `encoding/json`. ``` name old time/op new time/op delta ResultEncodings/json-encode-16 690ns ±12% 297ns ± 0% -56.94% (p=0.000 n=9+9) ResultEncodings/json-decode-16 1.05µs ± 1% 0.03µs ± 1% -97.47% (p=0.000 n=10+8) name old alloc/op new alloc/op delta ResultEncodings/json-encode-16 804B ±87% 0B -100.00% (p=0.000 n=9+10) ResultEncodings/json-decode-16 310B ± 0% 0B -100.00% (p=0.000 n=10+10) name old allocs/op new allocs/op delta ResultEncodings/json-encode-16 4.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10) ResultEncodings/json-decode-16 4.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10) ```
- Loading branch information
Showing
7 changed files
with
297 additions
and
242 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ vendor | |
*.lz | ||
|
||
.DS_Store | ||
.idea |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.