Commit graph

11 commits

Author SHA1 Message Date
Nicholas Nethercote
fd7f605365 Increase Span from 4 bytes to 8 bytes.
This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.

As a result, instruction counts drop across a range of workloads, by as
much as 12% for incremental "check" builds of `script-servo`.

Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.

The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
  cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
  with derived ones.
2019-04-05 12:26:09 +11:00
Nicholas Nethercote
ff94feabc2 Tweak Span encoding.
Failing to fit `base` is more common than failing to fit `len`.
2019-04-03 10:03:34 +11:00
Taiki Endo
6413480adf libsyntax_pos => 2018 2019-02-04 03:42:27 +09:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Vadim Petrochenkov
01b6d7cc6f libsyntax_pos: Tweak some visibilities 2018-07-08 16:17:36 +03:00
Nicholas Nethercote
77c40f8c6f Inline Span methods.
Because they are simple and hot.

This change speeds up some incremental runs of a few rustc-perf
benchmarks, the best by 3%.
2018-05-09 20:14:03 +10:00
John Kåre Alsaker
cbdf4ec03e Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
Oliver Schneider
52dec0e1c9
Don't derive traits on packed structs 2018-03-08 08:35:39 +01:00
Nadav Zingerman
0220600a0d Fix comment formatting 2017-11-05 01:24:20 +02:00
Nadav Zingerman
2304b3a7f1 Add comment explaining the ctxt field in Span 2017-11-04 15:54:03 +02:00
Vadim Petrochenkov
52251cd930 Compress "small" spans to 32 bits and intern "large" spans 2017-09-23 00:34:13 +03:00