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

feat(json): reduce string int decoding allocations #319

Merged
merged 2 commits into from
Apr 29, 2022

Conversation

tdakkota
Copy link
Member

Benchstat comparison:

name                 old time/op    new time/op    delta
DecodeStringInt32-4    96.3ns ± 2%    55.0ns ± 1%   -42.87%  (p=0.000 n=14+15)
DecodeStringInt64-4    97.1ns ± 2%    52.5ns ± 1%   -45.89%  (p=0.000 n=14+15)

name                 old alloc/op   new alloc/op   delta
DecodeStringInt32-4     16.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)
DecodeStringInt64-4     16.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)

name                 old allocs/op  new allocs/op  delta
DecodeStringInt32-4      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=15+15)
DecodeStringInt64-4      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=15+15)

Benchstat comparison:
```
name                 old time/op    new time/op    delta
DecodeStringInt32-4    96.3ns ± 2%    55.0ns ± 1%   -42.87%  (p=0.000 n=14+15)
DecodeStringInt64-4    97.1ns ± 2%    52.5ns ± 1%   -45.89%  (p=0.000 n=14+15)

name                 old alloc/op   new alloc/op   delta
DecodeStringInt32-4     16.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)
DecodeStringInt64-4     16.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)

name                 old allocs/op  new allocs/op  delta
DecodeStringInt32-4      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=15+15)
DecodeStringInt64-4      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=15+15)
```
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #319 (1b30743) into main (ba7472d) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #319      +/-   ##
==========================================
- Coverage   67.89%   67.85%   -0.04%     
==========================================
  Files         119      119              
  Lines        8029     8021       -8     
==========================================
- Hits         5451     5443       -8     
  Misses       2234     2234              
  Partials      344      344              
Impacted Files Coverage Δ
json/int.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba7472d...1b30743. Read the comment docs.

@ernado ernado merged commit 41863c9 into ogen-go:main Apr 29, 2022
@tdakkota tdakkota deleted the feat/speedup-string-int-decode branch April 30, 2022 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants