{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidun2rgcjlmgxoua6ao74afvcmcqgqpwaufvghzo3m6m35yfiapgu",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mjjgiprj2vz2"
},
"path": "/t/t-sort-by-index-and-t-sort-by-key-and-index/24172#post_10",
"publishedAt": "2026-04-15T06:44:56.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "It seems to be the issue with short-circuiting OR, as it creates too many bloat for optimizer. But there, I believe, llvm should be able to remove bounds checks for `slice`. But yeah, I don't know if assert of equal length for each array before the sort would still hold inside the closure.\n\nCould you elaborate a little bit more on this api? I can't quite grasp what is it. And do I understand correctly, that it will require allocation at the end?",
"title": "`<[T]>::sort_by_index` and `<[T]>::sort_by_key_and_index`"
}