Uh oh!
There was an error while loading. Please reload this page.
Use if SHARDS == 1 in a couple more places. - #94111
Conversation
It's already used in `get_shard_by_value`, doesn't hurt to add it in a couple of related functions for consistency.
nnethercote
commented
Feb 18, 2022
I got a miniscule win from this locally, let's see how CI looks. @bors try @rust-timer queue |
rust-timer
commented
Feb 18, 2022
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Feb 18, 2022
⌛ Trying commit 5563b36 with merge 1e3f3d2d4ce19371443dde82cdd1d32c9169766b... |
bors
commented
Feb 18, 2022
☀️ Try build successful - checks-actions |
rust-timer
commented
Feb 18, 2022
Queued 1e3f3d2d4ce19371443dde82cdd1d32c9169766b with parent 73a7423, future comparison URL. |
| // hashbrown also uses the lowest bits, so we can't use those | ||
| let bits = (hash >> (hash_len * 8 - 7 - SHARD_BITS)) as usize; | ||
| bits % SHARDS | ||
| if SHARDS == 1 { |
There was a problem hiding this comment.
https://godbolt.org/z/cq9nMvz1q This change is maybe redudant, since the optimizer will see that bits % 1 has to equal zero?
Mark-Simulacrum
commented
Feb 18, 2022
Cc #94084 - which drops sharding totally (at least for non parallel) |
rust-timer
commented
Feb 18, 2022
Finished benchmarking commit (1e3f3d2d4ce19371443dde82cdd1d32c9169766b): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. @bors rollup=never |
nnethercote
commented
Feb 19, 2022
It drops sharding for query caches, but not for interning. |
nnethercote
commented
Feb 19, 2022
This didn't end up being interesting, and #94084 is a more comprehensive possibility. |
It's already used in
get_shard_by_value, doesn't hurt to add it in acouple of related functions for consistency.
r? @ghost