Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can't really use dead code elimination on debug symbols, because you don't know which symbols will you need. You would need to know where and how will your program crash or if the user will want to use a debugger on it.


I don't understand. If a function isn't in the binary I will never need its name, so it does never have to be in the debug information. Likewise for variables.


I think linkers don't go this far to rewrite the debug info. If libstd is used, libstd's debug info is used.

The second problem is dynamic dispatch. The overhead in "hello world" is from printing and panicking machinery (it handles closed stdout), and these features use vtables, so it's even harder to precisely analyze what's actually used and what isn't.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: