about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-10-21 03:10:55 +0900
committerGitHub <noreply@github.com>2019-10-21 03:10:55 +0900
commitcc42adf3a21a4b1a359dfd8281693f3e892669d3 (patch)
treefc5ea542a67c36b0be5b5b0c3194799b7e347c56 /src/libsyntax/parse/parser
parent2518bbd5a3eb880de619920512b16b4c8818560c (diff)
parentc4deea212d19b19fa11fb4e29dd5c7f1359543a5 (diff)
downloadrust-cc42adf3a21a4b1a359dfd8281693f3e892669d3.tar.gz
rust-cc42adf3a21a4b1a359dfd8281693f3e892669d3.zip
Rollup merge of #65463 - nnethercote:rm-arena-allocation-from-expand_pattern, r=varkor
Avoid unnecessary arena allocations in `expand_pattern()`.

`expand_pattern()` has two callsites. One of them needs arena
allocation, but the other does not.

This commit moves the arena allocation out of the function. This avoids
the allocation of many 4 KiB page arena chunks that only hold a single
small allocation. It reduces the number of bytes allocated by up to 2%
for various benchmarks, albeit without only a very small improvement in
runtime.
Diffstat (limited to 'src/libsyntax/parse/parser')
0 files changed, 0 insertions, 0 deletions