-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
allow opting out of garbage collection overhead #11425
Comments
cc me |
To clarify: &Trait and ~Trait include the tydesc in the vtable, no? |
I believe it's the first field of the vtable. cc #11723 for the removal of the take glue. |
I suggest replacing the vtable pointer for |
#12059 finishes off the TyDescs as @pnkfelix and @pcwalton did not consider them necessary for garbage collection (can use side tables) I'll just keep a careful eye on future changes and open a bug if and when there's any new overhead there should be an opt-out from. There's not much point having a bug for a presumed future issue. |
Rust currently imposes overhead on all compiled code to accommodate managed pointers and will need to continue doing so to some extent for a real garbage collector. Trait objects and closures are opaque, and may contain garbage collected boxes. Support for correctly rooting references may involve overhead even for unique pointers without managed data inside.
including aTyDesc
, which should just be a destructor pointer&Trait
has aTyDesc
, which is unnecessary~Trait
has aTyDesc
, which should just be a destructor pointerfree glue is unnecessary, and should just be drop gluetake glue is unnecessaryThe text was updated successfully, but these errors were encountered: