alexcrichton / alexcrichton/scoped-tls
It does not optimize well
Open
- Dominant language
- Rust
- Stars
- 65
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I think a nested call to `FOO.with` should be cached and create `tlv_get_addr` call only once, but every call becomes `tlv_get_addr` call and it hurts the performance.
```rust
FOO.set(&1, || {
FOO.with(|foo| {
use_foo(foo);
FOO.with(|foo| {
use_foo(foo);
});
});
});
```
I think this code should use some sort of cache for the thread local.
This is the actual profiling result
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.