about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sharded.rs
AgeCommit message (Collapse)AuthorLines
2025-03-21Optimize hash map operations in the query systemJohn Kåre Alsaker-1/+1
2025-03-10Convert `ShardedHashMap` to use `hashbrown::HashTable`Josh Stone-17/+78
The `hash_raw_entry` feature has finished fcp-close, so the compiler should stop using it to allow its removal. Several `Sharded` maps were using raw entries to avoid re-hashing between shard and map lookup, and we can do that with `hashbrown::HashTable` instead.
2025-03-07compiler: Use size_of from the prelude instead of importedThalia Archibald-2/+2
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-03-03Remove leading underscores from parameter names in `Sharded`Zalathar-8/+8
With the removal of `cfg(parallel_compiler)`, these parameters are never considered unused.
2025-02-25Changed interners to start with preallocated capacityMichał Kostrubiec-0/+3
2024-11-12Delete the `cfg(not(parallel))` serial compilerNoratrieb-20/+1
Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon!
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+8
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-01-24rustc_data_structures: use either instead of itertoolsJosh Stone-1/+1
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-2/+2
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-14Fix some typoscui fliter-3/+3
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-08Remove the `LockMode` enum and `dispatch`John Kåre Alsaker-4/+4
2023-09-08Refactor `Lock` implementationJohn Kåre Alsaker-4/+7
2023-09-08Add optimized lock methods for `Sharded`John Kåre Alsaker-3/+50
2023-08-24Optimize `lock_shards`John Kåre Alsaker-7/+18
2023-08-16Remove `count`John Kåre Alsaker-10/+9
2023-08-16Keep SHARDS fixed instead of a function of `cfg!(parallel_compiler)`John Kåre Alsaker-4/+19
2023-08-15Make Sharded an enum and specialize it for the single thread caseJohn Kåre Alsaker-36/+30
2023-05-28Add some commentsJohn Kåre Alsaker-0/+4
2023-05-28Don't access self.mask with a single shardJohn Kåre Alsaker-1/+1
2023-05-28Use only one shard with a single threadJohn Kåre Alsaker-10/+34
2023-04-16Move the WorkerLocal type from the rustc-rayon fork into rustc_data_structuresJohn Kåre Alsaker-5/+1
2023-04-09Allow `modulo_one` on function using cfg constsNilstrieb-0/+1
2023-03-30`CacheAligned` and `Sharded` don't need to derive `Clone`.Nicholas Nethercote-2/+1
2022-02-20Move Sharded maps into each QueryCache implMark Rousskov-1/+1
2021-09-18Use <[T; N]>::map in Sharded instead of SmallVec and unsafe codebjorn3-19/+1
This results in a lot less assembly
2021-02-13Separate the query cache from the query state.Camille GILLOT-15/+15
2020-08-30mv compiler to compiler/mark-0/+168