Skip to content

Use get_writeable_symbol() to avoid redundant search #7615

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

Merged
merged 1 commit into from
May 19, 2023

Conversation

tautschnig
Copy link
Collaborator

Don't iterate over a symbol table and then search the symbol we hold an iterator to from scratch. Just use our custom iterators instead of ranged for loops to directly access a writeable version of the symbol.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Don't iterate over a symbol table and then search the symbol we hold an
iterator to from scratch. Just use our custom iterators instead of
ranged for loops to directly access a writeable version of the symbol.
@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Patch coverage: 88.17% and project coverage change: -0.02 ⚠️

Comparison is base (2c5a2e5) 78.50% compared to head (4a93fcf) 78.48%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7615      +/-   ##
===========================================
- Coverage    78.50%   78.48%   -0.02%     
===========================================
  Files         1670     1670              
  Lines       191802   191802              
===========================================
- Hits        150575   150544      -31     
- Misses       41227    41258      +31     
Impacted Files Coverage Δ
src/cpp/cpp_typecheck_template.cpp 72.70% <25.00%> (-0.22%) ⬇️
src/cpp/cpp_typecheck_declaration.cpp 73.25% <50.00%> (+0.84%) ⬆️
...code/java_bytecode_concurrency_instrumentation.cpp 96.58% <60.00%> (ø)
src/goto-cc/linker_script_merge.cpp 79.02% <87.50%> (+0.10%) ⬆️
src/goto-instrument/dump_c.cpp 80.09% <88.88%> (+0.11%) ⬆️
src/ansi-c/c_typecheck_type.cpp 77.02% <100.00%> (-0.03%) ⬇️
src/cpp/cpp_typecheck.cpp 77.27% <100.00%> (-0.30%) ⬇️
src/cpp/cpp_typecheck_expr.cpp 71.83% <100.00%> (-0.10%) ⬇️
src/goto-programs/name_mangler.h 98.48% <100.00%> (+0.02%) ⬆️
src/goto-programs/remove_complex.cpp 87.50% <100.00%> (+0.08%) ⬆️
... and 5 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@peterschrammel peterschrammel removed their assignment Mar 27, 2023
@tautschnig tautschnig merged commit fb42722 into diffblue:develop May 19, 2023
@tautschnig tautschnig deleted the cleanup/no-redundant-lookup branch May 19, 2023 09:08
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.

4 participants