Use new thread-local const-init
Let's see if this gives us any speedup - some of the TLS state modified in this commit *is* pretty heavily accessed, so we can hope!
This commit is contained in:
parent
89ebad52a8
commit
5065144d6d
5 changed files with 8 additions and 6 deletions
|
@ -1330,7 +1330,7 @@ fn update_disambiguator(expn_id: ExpnId) {
|
|||
// This cache is only used by `DummyHashStableContext`,
|
||||
// so we won't pollute the cache values of the normal `StableHashingContext`
|
||||
thread_local! {
|
||||
static CACHE: ExpnIdCache = Default::default();
|
||||
static CACHE: ExpnIdCache = const { ExpnIdCache::new(Vec::new()) };
|
||||
}
|
||||
|
||||
&CACHE
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#![feature(negative_impls)]
|
||||
#![feature(nll)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(thread_local_const_init)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue