Conversation
b283c44 to
ae36f44
Compare
This comment has been minimized.
This comment has been minimized.
|
Would it potentially enable those types to have an ffi compatible ABI? So that they could be returned and passed directly from /to ffi function, like |
This comment has been minimized.
This comment has been minimized.
I think in theory it is possible, at least for sized types, but I am not familiar with how to formally make it so. |
ae36f44 to
0d6165f
Compare
This comment has been minimized.
This comment has been minimized.
0d6165f to
98edd5b
Compare
This comment has been minimized.
This comment has been minimized.
|
r? libs |
98edd5b to
8beb51d
Compare
This comment has been minimized.
This comment has been minimized.
8beb51d to
d7879fa
Compare
This comment has been minimized.
This comment has been minimized.
d7879fa to
317aa0e
Compare
|
@EFanZh Is this ready for review? If so, please un-draft the PR. |
|
@joboet: The source code part is mostly done, but I haven’t finished updating LLDB and CDB pretty printers. The CI doesn’t seem to run those tests. |
|
No worries! I just didn't want to keep you waiting in case you had forgotten to change the state. |
f243654 to
1308bf6
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
#141348 (comment) |
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.
|
Finished benchmarking commit (d1342e2): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.7%, secondary 4.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.7%, secondary 3.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 1.0%, secondary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.182s -> 486.498s (-0.75%) |
View all comments
Currently,
Rc<T>andArc<T>store pointers toRcInner<T>andArcInner<T>. This PR changes the pointers so that they point toTdirectly instead.This is based on the assumption that we access the
Tvalue more frequently than accessing reference counts. With this change, accessing the data can be done without offsetting pointers fromRcInner<T>andArcInner<T>to their contained data. This change might also enables some possibly useful future optimizations, such as:&[Rc<T>]into&[&T]within O(1) time.&[Rc<T>]intoVec<&T>utilizingmemcpy.&Option<Rc<T>>intoOption<&T>without branching.Rc<T>andArc<T>FFI compatible types whereT: Sized.