Uh oh!
There was an error while loading. Please reload this page.
Rewrite native thread-local storage - #116123
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
joboet
commented
Nov 24, 2023
@rustbot author |
| fn __init() -> $t { | ||
| $init | ||
| } |
There was a problem hiding this comment.
I have been impl'ing a lint in clippy to suggest const if possible, and it relies on this structure existing and returning exactly $init. As long as this doesn't change, the lint should keep working.
bors
commented
Jan 13, 2024
☔ The latest upstream changes (presumably #117285) made this pull request unmergeable. Please resolve the merge conflicts. |
Dylan-DPC
commented
Feb 15, 2024
@joboet any updates on this? thanks |
joboet
commented
Feb 15, 2024
@rustbot label +S-blocked I want to do some other cleanups before this can be merged. |
joboet
commented
Mar 12, 2024
This comment has been minimized.
This comment has been minimized.
joboet
commented
Mar 16, 2024
I'm curious as to whether this affects performance. This should reduce the number of TLS accesses, after all. |
This comment has been minimized.
This comment has been minimized.
bors
commented
Apr 27, 2024
☔ The latest upstream changes (presumably #124428) made this pull request unmergeable. Please resolve the merge conflicts. |
m-ou-se
commented
May 23, 2024
Thanks for working on this! This looks great.
Agreed! r=me after rebasing |
This comment has been minimized.
This comment has been minimized.
joboet
commented
May 23, 2024
bors
commented
May 23, 2024
ghost
commented
May 23, 2024
I haven't checked the code, but does the clippy lint work? |
joboet
commented
May 23, 2024
Yes, it should work. |
ghost
commented
May 23, 2024
Splendid, thank you very much! |
bors
commented
May 23, 2024
bors
commented
May 23, 2024
☀️ Test successful - checks-actions |
rust-timer
commented
May 23, 2024
Finished benchmarking commit (9c8a58f): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary 6.9%, secondary 3.7%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.9%, secondary 3.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary 0.1%, secondary 0.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 673.262s -> 673.733s (0.07%) |
(part of #110897)
The current native thread-local storage implementation has become quite messy, uses indescriptive names and unnecessarily adds code to the macro expansion. This PR tries to fix that by using a new implementation that also allows more layout optimizations and potentially increases performance by eliminating unnecessary TLS accesses.
This does not change the recursive initialization behaviour I described in this comment, so it should be a library-only change. Changing that behaviour should be quite easy now, however.
r? @m-ou-se
@rustbot label +T-libs