muktihari / fit

A FIT SDK for decoding and encoding Garmin FIT files in Go supporting FIT Protocol V2.
BSD 3-Clause "New" or "Revised" License
42 stars 4 forks source link

perf: mesgdef micro optimisation #363

Closed muktihari closed 3 months ago

muktihari commented 3 months ago

Benchmark:

goos: darwin
goarch: amd64
pkg: github.com/muktihari/fit/profile/mesgdef
cpu: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
               │  old.txt   │              new.txt               │
               │   sec/op    │   sec/op     vs base                │
RecordToMesg-4   214.1n ± 1%   174.6n ± 2%  -18.43% (p=0.000 n=10)
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (091ed76) to head (9d5b4a4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #363 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 41 41 Lines 3663 3662 -1 ========================================= - Hits 3663 3662 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.