about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-02 17:46:44 -0700
committerGitHub <noreply@github.com>2016-11-02 17:46:44 -0700
commitf9f45c6dacd0f0d0a44473931291a4fa6bbb4ddc (patch)
tree22180e03ed27a4b1ad05d1fa1427cc71fd8d6f6d /src/libstd
parent5665bdf3e3953a3fe67e047794913a0c88a83bde (diff)
parent7b33f7e3e77794e8a44d07d97bc7b62ab9f79981 (diff)
downloadrust-f9f45c6dacd0f0d0a44473931291a4fa6bbb4ddc.tar.gz
rust-f9f45c6dacd0f0d0a44473931291a4fa6bbb4ddc.zip
Auto merge of #36993 - nnethercote:obligation, r=nikomatsakis
Optimize ObligationForest's NodeState handling.

This commit does the following.
- Changes `NodeState` from an enum to a `bitflags`. This makes it
  possible to check against multiple possible values in a single bitwise
  operation.
- Replaces all the hot `match`es involving `NodeState` with `if`/`else`
  chains that ensure that cases are handled in the order of frequency.
- Partially inlines two functions, `find_cycles_from_node` and
  `mark_as_waiting_from`, at two call sites in order to avoid function
  unnecessary function calls on hot paths.
- Fully inlines and removes `is_popped`.

These changes speeds up rustc-benchmarks/inflate-0.1.0 by about 7% when
doing debug builds with a stage1 compiler.

r? @arielb1
Diffstat (limited to 'src/libstd')
0 files changed, 0 insertions, 0 deletions