Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #22709 from mingley/mingley/reduce-parser-joint-capacity
perf: Reduce parser joint-token allocation
| -rw-r--r-- | crates/parser/src/input.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/parser/src/input.rs b/crates/parser/src/input.rs index 42e8a400ed..54272ea9c9 100644 --- a/crates/parser/src/input.rs +++ b/crates/parser/src/input.rs @@ -27,7 +27,7 @@ impl Input { pub fn with_capacity(capacity: usize) -> Self { Self { kind: Vec::with_capacity(capacity), - joint: Vec::with_capacity(capacity / size_of::<bits>()), + joint: Vec::with_capacity(capacity.div_ceil(bits::BITS as usize)), contextual_kind: Vec::with_capacity(capacity), edition: Vec::with_capacity(capacity), } |