Closed
Description
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.