-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchS-needs-infoStatus: The issue lacks details necessary to triage or act on it.Status: The issue lacks details necessary to triage or act on it.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
In rust-lang/literal-escaper#15 I introduced NonZero into literal-escaper, but noticed perf regressions (on ARM).
On compiler explorer I noticed x86_64 asm differences that seem to indicate there may be a difference in inlining behavior: asm being generated without code differences in the surrounding code (does that not mean it is dead?). These can indeed be removed by uncommenting the commented #[inline]
directives (top left pane). On arm, the changes are similar but more extensive and I can't tell whether extra function code is called or not.
Sprinkling the right #[inline]
directives does remove the perf regressions on ARM. I haven't been able to do perf measurements on x86_64 yet.
Metadata
Metadata
Assignees
Labels
C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchS-needs-infoStatus: The issue lacks details necessary to triage or act on it.Status: The issue lacks details necessary to triage or act on it.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.