-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-codegenArea: Code generationArea: Code generationA-sliceArea: `[T]`Area: `[T]`C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
See https://godbolt.org/z/fE18sq4WK, you can find serval calls to the following functions:
core::panicking::panic
core::panicking::panic_bounds_check
core::slice::index::slice_end_index_len_fail
core::slice::index::slice_index_order_fail
core::slice::index::slice_start_index_len_fail
To my understanding, if the sorting algorithm implementation is correct, no bounds checking failure will occur, so this might be something we can optimize, but I am not sure how much these bounds checking codes can affect performance or whether it’s worth looking into.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-sliceArea: `[T]`Area: `[T]`C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchCategory: An issue highlighting optimization opportunities or PRs implementing suchE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.