Skip to content

don't compile Regex in frequently called function get_rust_item#971

Merged
tjhance merged 3 commits intomainfrom
lazy-regex
Feb 5, 2024
Merged

don't compile Regex in frequently called function get_rust_item#971
tjhance merged 3 commits intomainfrom
lazy-regex

Conversation

@tjhance
Copy link
Copy Markdown
Collaborator

@tjhance tjhance commented Feb 2, 2024

Savings are significant; on the mem-allocator project, rust-to-vir goes down from nearly 2s. to 0.3s.

@tjhance tjhance requested a review from utaal February 2, 2024 20:40
@utaal-b utaal-b requested review from utaal-b and removed request for utaal February 5, 2024 12:12
@utaal-b
Copy link
Copy Markdown
Contributor

utaal-b commented Feb 5, 2024

This is a tiny dependency, but just in case we can avoid it: would the OnceCells introduced here be sufficient? rust-lang/rust#105587

@tjhance tjhance merged commit 2aed333 into main Feb 5, 2024
@tjhance tjhance deleted the lazy-regex branch February 5, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants