Closed
Description
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.
- closures currently have a 4-word header which is unnecessary
- procs currently have a 4-word header
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 unnecessary- any future support for tracing (shadow stack, references inside unique pointers, etc.) should be entirely disabled