Open Bug 1483775 Opened 7 years ago Updated 3 years ago

Investigate un-inlining some parts of encoding_rs::mem

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

People

(Reporter: hsivonen, Unassigned)

References

Details

A 0.13% installer size increase was attributed to bug 1402247. See https://treeherder.mozilla.org/perf.html#/alerts?id=15036 Currently the Rust FFI forces a non-inlining boundary and in order to reduce the total number of non-inline function calls, the functions in encoding_rs::mem permit cross-crate inlining. Once we get cross-language inlining from LLVM ThinLTO, we should revisit the inlining status of encoding_rs::mem in the interest of code size: Once ThinLTO can inline the FFI stubs, it'll probably make sense move the non-inlining boundary from FFI one step towards encoding_rs::mem. At that point, we could also remove inlined C++-side ASCII handling from the C++ wrappers in nsReadableUtils.h. (Do we have a tool that compiles Firefox with both optimizations and debug info enabled and looks at the debug info to count the number of copies of each function from encoding_rs::mem?)
Component: String → XPCOM
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.