Viatorus / emio

A safe and fast high-level and low-level character input/output library for bare-metal and RTOS based embedded systems with a very small binary footprint.
https://viatorus.github.io/emio/
MIT License
128 stars 3 forks source link

perf: improve reader and parser by using iterators instead of string view operations #57

Closed Viatorus closed 9 months ago

codecov-commenter commented 9 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (c33df45) 99.39% compared to head (5f12a30) 99.41%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #57 +/- ## ========================================== + Coverage 99.39% 99.41% +0.01% ========================================== Files 55 55 Lines 5654 5644 -10 ========================================== - Hits 5620 5611 -9 + Misses 34 33 -1 ``` | [Files](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert) | Coverage Δ | | |---|---|---| | [include/emio/detail/conversion.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL2RldGFpbC9jb252ZXJzaW9uLmhwcA==) | `100.00% <ø> (ø)` | | | [include/emio/detail/format/formatter.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL2RldGFpbC9mb3JtYXQvZm9ybWF0dGVyLmhwcA==) | `98.71% <100.00%> (ø)` | | | [include/emio/detail/format/parser.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL2RldGFpbC9mb3JtYXQvcGFyc2VyLmhwcA==) | `100.00% <100.00%> (ø)` | | | [include/emio/detail/parser.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL2RldGFpbC9wYXJzZXIuaHBw) | `98.29% <100.00%> (+0.94%)` | :arrow_up: | | [include/emio/detail/scan/parser.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL2RldGFpbC9zY2FuL3BhcnNlci5ocHA=) | `100.00% <100.00%> (ø)` | | | [include/emio/ranges.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL3Jhbmdlcy5ocHA=) | `95.65% <ø> (-0.45%)` | :arrow_down: | | [include/emio/reader.hpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-aW5jbHVkZS9lbWlvL3JlYWRlci5ocHA=) | `100.00% <100.00%> (ø)` | | | [test/unit\_test/detail/test\_bitset.cpp](https://app.codecov.io/gh/Viatorus/emio/pull/57?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Toni+Neubert#diff-dGVzdC91bml0X3Rlc3QvZGV0YWlsL3Rlc3RfYml0c2V0LmNwcA==) | `100.00% <100.00%> (ø)` | |

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

Viatorus commented 9 months ago

Overall code size even reduced by 320 bytes! :) [Except format_int test - +20 bytes].

Performance is quit good as well!