Skip to content

Commit

Permalink
Auto merge of #108106 - the8472:layout-opt, r=wesleywiser
Browse files Browse the repository at this point in the history
Improve niche placement by trying two strategies and picking the better result

Fixes #104807
Fixes #105371

Determining which sort order is better requires calculating the struct size (so we can calculate the niche offset). But that in turn depends on the field order, so happens after sorting. So the simple way to solve that is to run the whole thing twice and pick the better result.

1st commit is just code motion, the meat is in the later ones.
  • Loading branch information
bors committed Apr 29, 2023
2 parents 1400757 + 544aa38 commit bcd6d24
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit bcd6d24

Please sign in to comment.