Skip to content

Commit

Permalink
chore(deps): update bumpalo crate (#2417)
Browse files Browse the repository at this point in the history
Latest version of `bumpalo` includes a couple of performance fixes for
`String` (e.g. fitzgen/bumpalo#229) which may
help the parser a little.
  • Loading branch information
overlookmotel committed Feb 18, 2024
1 parent 67d7a46 commit 90f9266
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ oxc_language_server = { path = "crates/oxc_language_server" }
assert-unchecked = { version = "0.1.2" }
bpaf = { version = "0.9.9" }
bitflags = { version = "2.4.2" }
bumpalo = { version = "3.14.0" }
bumpalo = { version = "3.15.0" }
convert_case = { version = "0.6.0" }
criterion = { version = "0.5.1", default-features = false }
crossbeam-channel = { version = "0.5.11" }
Expand Down
2 changes: 0 additions & 2 deletions crates/oxc_parser/src/lexer/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ impl<'a> Lexer<'a> {
let mut str = String::with_capacity_in(capacity, self.allocator);

// Push identifier up this point into `str`
// `bumpalo::collections::string::String::push_str` is currently expensive due to
// inefficiency in bumpalo's implementation. But best we have right now.
str.push_str(so_far);

// Process escape and get rest of identifier
Expand Down
2 changes: 0 additions & 2 deletions crates/oxc_parser/src/lexer/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ macro_rules! handle_string_literal_escape {
let mut str = String::with_capacity_in(capacity, $lexer.allocator);

// Push chunk before `\` into `str`.
// `bumpalo::collections::string::String::push_str` is currently expensive due to
// inefficiency in bumpalo's implementation. But best we have right now.
str.push_str(so_far);

'outer: loop {
Expand Down

0 comments on commit 90f9266

Please sign in to comment.