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

perf: clean up proto and improve mesgdef #64

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

muktihari
Copy link
Owner

  • clean up proto.Field's Size since no longer used
  • improve mesgdef, now use fields pool, a backed array for slicing, instead of counting size before creating the slice.

benchstat:

goos: darwin
goarch: amd64
pkg: github.com/muktihari/fit/profile/mesgdef
cpu: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
          record_gen_old.txt        record_gen_new.txt       
                sec/op           sec/op     vs base          
ToMesg-4         968.3n ± 24%   959.3n ± 20%  ~ (p=0.912 n=10)

          record_gen_old.txt         record_gen_new.txt         
                 B/op            B/op     vs base               
ToMesg-4           360.0 ± 0%   352.0 ± 0%  -2.22% (p=0.000 n=10)

          record_gen_old.txt          record_gen_new.txt         
              allocs/op       allocs/op   vs base                
ToMesg-4          11.000 ± 0%   9.000 ± 0%  -18.18% (p=0.000 n=10)

@muktihari muktihari added the performance Changes related to performance improvement label Dec 23, 2023
@muktihari muktihari self-assigned this Dec 23, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fda586c) 100.00% compared to head (73001f5) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #64   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         3007      3007           
=========================================
  Hits          3007      3007           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@muktihari muktihari merged commit ec124c4 into master Dec 23, 2023
1 check passed
@muktihari muktihari deleted the perf/clean-up-proto-and-improve-mesgdef branch December 23, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Changes related to performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants