oxc/crates
overlookmotel 383f5b3081
perf(parser): consume multi-line comments faster (#2377)
Consume multi-line comments faster.

* Initially search for `*/`, `\r`, `\n` or `0xE2` (first byte of
irregular line breaks).
* Once a line break is found, switch to faster search which only looks
for `*/`, as it's not relevant whether there are more line breaks or
not.

Using `memchr` for the 2nd simpler search, as it's efficient for a
search with only one "needle".

Initializing `memchr::memmem::Finder` is fairly expensive, and tried
numerous ways to handle it. This is most performant way I could find.
Any ideas how to avoid re-creating it for each Lexer pass? (it can't be
a `static` as `Finder::new` is not a const function, and `lazy_static!`
is too costly)
2024-02-11 12:43:14 +08:00
..
oxc Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_allocator Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_ast feat(prettier): print newlines between array expression elements (#2379) 2024-02-10 17:31:09 +08:00
oxc_cli feat(cli): add --version (#2182) 2024-01-26 19:13:17 +08:00
oxc_codegen Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_diagnostics Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_index Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_js_regex
oxc_language_server chore(deps): update cargo (#2191) 2024-01-29 11:38:47 +08:00
oxc_linter perf(lint/no_var_requires): quicker way to check if the IdentifierReference point to a global variable (#2376) 2024-02-10 22:46:02 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_parser perf(parser): consume multi-line comments faster (#2377) 2024-02-11 12:43:14 +08:00
oxc_prettier refactor(prettier): improve print_statement_sequence (#2383) 2024-02-11 00:16:26 +08:00
oxc_semantic Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_span Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_syntax Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_transformer Publish crates v0.7.0 2024-02-09 23:01:12 +08:00
oxc_wasm chore(wasm): remove console_error_panic_hook 2024-02-02 17:02:01 +08:00