Skip to content

simplify_byte_extract: avoid unnecessary calls to has_subtype #7712

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

Conversation

tautschnig
Copy link
Collaborator

This is a performance-improving refactoring: We only need the result of a has_subtype call under conditions that are infrequently met. On the benchmark of #7357, this avoids 443214 calls of has_subtype, which previously was the most costly part of simplify_byte_extract.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a 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.

This is a performance-improving refactoring: We only need the result of
a `has_subtype` call under conditions that are infrequently met. On the
benchmark of diffblue#7357, this avoids 443214 calls of `has_subtype`, which
previously was the most costly part of `simplify_byte_extract`.
@tautschnig tautschnig force-pushed the cleanup/simplify-byte-extract branch from c57ab77 to ff7af47 Compare May 15, 2023 15:12
@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (8c152bc) 78.53% compared to head (ff7af47) 78.55%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7712      +/-   ##
===========================================
+ Coverage    78.53%   78.55%   +0.02%     
===========================================
  Files         1686     1686              
  Lines       192930   192931       +1     
===========================================
+ Hits        151520   151562      +42     
+ Misses       41410    41369      -41     
Impacted Files Coverage Δ
src/util/simplify_expr.cpp 85.50% <100.00%> (+<0.01%) ⬆️

... and 3 files with indirect coverage changes

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

@tautschnig tautschnig removed their assignment May 16, 2023
@peterschrammel peterschrammel removed their assignment May 17, 2023
@tautschnig tautschnig merged commit dd8e64a into diffblue:develop May 17, 2023
@tautschnig tautschnig deleted the cleanup/simplify-byte-extract branch May 17, 2023 11:02
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.

3 participants