-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BTree: initialize node on the heap through initialized header #82226
Conversation
The benchmarks only really say it's not the same as before.
|
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9da1244df533250a0faf9e8dd1d1ba02fbfe8c44 with merge 395ce193633fda52d070a349e9f6ddcb6cc456fc... |
This comment has been minimized.
This comment has been minimized.
LeafNode::init(leaf.as_mut_ptr()); | ||
let mut leaf = Box::<Self>::new_uninit(); | ||
// We only need to initialize the header; the arrays are MaybeUninit. | ||
(*leaf.as_mut_ptr()).head = Head::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we still use a raw write here? There's no Drop
, but I'm not sure if this still technically has implications about the former uninit head
value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know how to do it non-raw. I'm happy when it compiles and when Miri says it the unit tests are okay. Although I haven't updated or run the raw pointer tests lately, so I'm not sure Miri checks anything here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think you mean the opposite of what I first understood. It isn't a raw write any more (because of #73987) and we probably should still do it.
4521d89
to
29b3646
Compare
29b3646
to
751c14f
Compare
First I forgot about gdb_providers, and now that isn't backwards compatible (yet), and it's a pain to test anyway. And if I'm right in #82115 about the odd preference for 32 bit width in generated code,
|
My angle on #81494.
r? @Mark-Simulacrum