Skip to content

Shrink Span #15594

Closed
Closed
@emberian

Description

@emberian

Span is how we know what source a given piece of the AST corresponds to. There are many, many Spans when compiling a crate. It is currently 16 bytes.

Since a span is always contiguous, it can be compressed by storing the base (u32) plus a length (u16). Furthermore, expn_info is currently occupying a full 8 bytes. It could be replaced with a u16 index into some expn_info table somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.I-compiletimeIssue: Problems and improvements with respect to compile times.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions