Remove usage of chars() iterator when bytes() can be used for ascii text#57
Remove usage of chars() iterator when bytes() can be used for ascii text#57klensy wants to merge 11 commits intorust-lang:mainfrom
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.