-
Notifications
You must be signed in to change notification settings - Fork 51
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
Remove usage of chars() iterator when bytes() can be used for ascii text #57
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! Can you detail a bit more as to the motivation of this change though? |
Purpose was (when i wrote it, before recent updates to rustc_demangle) was reduce size of demangler, because it get inserted in almost every rust binary: I.e. fn main() {
println!("Hello world!");
}
Btw, why v0 demangler used, if symbol-mangling-version=legacy is default and explicitly selected? |
Ah ok, nice! Can you post before/after measurements to see the size impact that this has? The v0 demangler isn't necessarily used there, it's just compiled in. Runtime detection determines whether the legacy or v0 demangler is used. It so-happens though that most Rust libraries don't use the v0 demangler at this time. |
Ok
|
There's no way really in how libstd is built to have a rustc flag affect what code is compiled in, so both are compiled in. If desired, though, since v0 is so uncommon it could be placed behing a compile-time feature for this crate and turned off in libstd, although I don't think that's a great solution either because then if v0 is used it won't be demangled properly. |
No description provided.