Object size of the rfl drviers are larger than the corresponding C drivers especially when with debug symbols #1039
Labels
• toolchain
Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...
Recently I have a research project about comparing the RFL drivers with C drivers. I found that Rust drivers are bigger than C especially when they are compiled with symbols. From what I observed, the Rust drivers are 2X than C drivers without debug symbols and 4-6X with debug symbols. I use the binder driver from the earlier version as an example to show this. There are two object files of the binder driver on the C side. I just use one as an example to explain.
The extra size comes from two reasons.
debug_pubnames
,debug_pubtypes
, anddebug_ranges
. There is a PR, but it is not landing due to the CI problems.debug_str
anddebug_info
. These are caused by generic programming and the wrapping functions. It is hard to optimize them for now.Before optimizing this, I want to ask for advice/opinions from the community. Does the object size of the RFL drivers matter? Is there anyone working on this?
The text was updated successfully, but these errors were encountered: