Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance with hashing large constant strings #58860

Open
clubby789 opened this issue Nov 7, 2022 · 1 comment
Open

Poor performance with hashing large constant strings #58860

clubby789 opened this issue Nov 7, 2022 · 1 comment

Comments

@clubby789
Copy link
Contributor

Found as part of rust-lang/rust#103812.

When creating a very large constant blob, a large proportion of compile time is spent hashing the string with djbHash to insert it into CDSConstants

auto &Slot =
*Ty->getContext()
.pImpl->CDSConstants.insert(std::make_pair(Elements, nullptr))
.first;

@alloc = private unnamed_addr constant <{ [104857600 x i8] }> <{ [104857600 x i8] c"... VERY LONG DATA ..." }>, align 1

cc @pcwalton

@clubby789
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants