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

⚡ Utilize std::string_view instead of std::string in many places to improve performance #153

Merged
merged 3 commits into from
Mar 23, 2023

Conversation

marcelwa
Copy link
Collaborator

@marcelwa marcelwa commented Mar 22, 2023

Description

This PR improves the performance of many string-based functions by switching to std::string_view and thus avoiding string copy costs.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@marcelwa marcelwa added the performance Performance improvements label Mar 22, 2023
@marcelwa marcelwa self-assigned this Mar 22, 2023
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #153 (d802e23) into main (ebe0543) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage   94.00%   94.00%           
=======================================
  Files          76       76           
  Lines        7085     7090    +5     
=======================================
+ Hits         6660     6665    +5     
  Misses        425      425           
Impacted Files Coverage Δ
include/fiction/io/dot_drawers.hpp 93.29% <100.00%> (+0.14%) ⬆️
include/fiction/io/network_reader.hpp 65.95% <100.00%> (+0.74%) ⬆️
include/fiction/io/read_fqca_layout.hpp 98.68% <100.00%> (ø)
include/fiction/io/read_sidb_surface_defects.hpp 100.00% <100.00%> (ø)
include/fiction/layouts/cell_level_layout.hpp 100.00% <100.00%> (ø)
include/fiction/layouts/clocking_scheme.hpp 97.22% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@marcelwa marcelwa merged commit 06cea6c into main Mar 23, 2023
@marcelwa marcelwa deleted the string_view branch March 23, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant