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): optimize UUID encode/decode #98

Merged
merged 2 commits into from
Jan 3, 2022

Conversation

tdakkota
Copy link
Member

@tdakkota tdakkota commented Jan 2, 2022

name          old time/op    new time/op    delta
DecodeUUID-4     173ns ± 3%     148ns ±34%   -14.15%  (p=0.001 n=13+15)
EncodeUUID-4     182ns ± 8%      29ns ±18%   -84.11%  (p=0.000 n=13+15)

name          old speed      new speed      delta
DecodeUUID-4   220MB/s ± 3%   261MB/s ±26%   +18.39%  (p=0.001 n=13+15)
EncodeUUID-4   209MB/s ± 8%  1323MB/s ±16%  +532.72%  (p=0.000 n=13+15)

name          old alloc/op   new alloc/op   delta
DecodeUUID-4     48.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)
EncodeUUID-4     48.0B ± 0%      0.0B       -100.00%  (p=0.000 n=15+15)

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

@codecov
Copy link

codecov bot commented Jan 2, 2022

Codecov Report

Merging #98 (8904bc2) into main (7aacc60) will increase coverage by 0.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   71.26%   71.56%   +0.30%     
==========================================
  Files          70       70              
  Lines        4005     4048      +43     
==========================================
+ Hits         2854     2897      +43     
  Misses        966      966              
  Partials      185      185              
Impacted Files Coverage Δ
json/uuid.go 94.11% <100.00%> (+31.61%) ⬆️

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 7aacc60...8904bc2. Read the comment docs.

@ernado ernado merged commit 703e641 into ogen-go:main Jan 3, 2022
@tdakkota tdakkota deleted the fix/faster-format-decode branch January 3, 2022 12:06
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.

None yet

2 participants