-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Bitv indexing does not inline static values #19393
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.
With
--opt-level=3:In particular, there's the two
...mov...q _ZN3bit5...20h4511a5a4abbc9859osaE@GOTPCREL(%rip), %rcxlines, which are loading the addresses ofTRUEandFALSErespectively. In the best case, the[]notation on a bitv will not do this sinceTRUEandFALSEtruly are constants and are OK to inline (alternatively, it could just avoid doing the hack to useIndexand use a by-value index instead).