diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-05-07 15:03:45 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-05-07 15:03:45 +1000 |
| commit | cbc577fc719e00f60004c8b22db0256f4c9da4b2 (patch) | |
| tree | 993d6f72f086416bec155b180a5c3e602eaf7ec4 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | a0c61a904482129989f5c1e5cb9f1008efb76f7f (diff) | |
| download | rust-cbc577fc719e00f60004c8b22db0256f4c9da4b2.tar.gz rust-cbc577fc719e00f60004c8b22db0256f4c9da4b2.zip | |
Reduce `TypedArena` creations in `check_match`.
`check_match` creates a new `TypedArena` for every call to `create_and_enter`. DHAT tells me that each `TypedArena` typically is barely used, with typically a single allocation per arena. This commit moves the `TypedArena` creation outwards a bit, into `check_match`, and then passes it into `create_and_enter`. This reduces the number of arenas created by about 4-5x, for a very small perf win. (Moving the arena creation further outwards is hard because `check_match` is a query.)
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
