about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-16 17:22:35 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-10-16 18:47:20 +1100
commitc4deea212d19b19fa11fb4e29dd5c7f1359543a5 (patch)
tree8c38a77a200be90bcbd33102f1df71a219fb09da /src/libsyntax/parse/parser
parent237d54ff6c4fb3577e02d4c5af02813c11b63d01 (diff)
downloadrust-c4deea212d19b19fa11fb4e29dd5c7f1359543a5.tar.gz
rust-c4deea212d19b19fa11fb4e29dd5c7f1359543a5.zip
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