feat(allocator/vec2): introduce extend_desugared method as extend internal implementation#10670
Conversation
CodSpeed Instrumentation Performance ReportMerging #10670 will not alter performanceComparing Summary
|
92d4255 to
1e4bc1b
Compare
1e4bc1b to
ef784ca
Compare
3648471 to
c01878f
Compare
58652a1 to
25f8411
Compare
ef784ca to
e64c52c
Compare
25f8411 to
7d8efd8
Compare
e64c52c to
11d0723
Compare
11d0723 to
a3d2995
Compare
9481aae to
9db9639
Compare
Merge activity
|
9db9639 to
6ce3bbb
Compare
WalkthroughThe implementation of the 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (16)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…marking reserve as `#[cold]` and `#[inline(never)]` (#10675) I guess the performance regression reason is that the current implementation has more instructions than before. Here to use the lower of `size_hint` to reserve space, which is bloating the loop body. Also, the `for` loop is easier to optimize by the compiler. `reserve` inside `extend` is rarely taken, so mark it as `#[cold]` and `#[inline(never)]`, which can reduce the instructions in `while` loop. We got a 3%-4% performance improvement in the `minfier`, but the transformer performance did not fully get back to before #10670. Anyway, I think we can accept the less than 1% performance regression; this change can unblock us from pushing forward the `Vec` improvement; we will get it back in at the end of the stack! See #9856

Align
extendimplementation with the standard library, since theExtendTrustedis still unstable, so I haven't introduced theextend_trustedyet. Some of the benchmark performance regression has been almost fixed in #10675.