github.com/rust-lang/ba... I optimized the size of every Rust binary (that uses std) by over 1kb :). It's not a lot but it's something! There were some easy size optimizations around placing function boundaries to reuse code, and in the end I went all in with some unsafe to remove bounds checks :3.
Post
github.comOptimize proc maps parsing code size by Noratrieb · Pull Request #729 · rust-lang/backtrace-rsThe current code size is really wastefully large. Originally, it was 1500 lines of assembly in Godbolt, now I reduced it to just under 800. The effect of .text size in hello world is from 297028 to...
it had some CI to check binary size changes but it caused too many problems and was removed again. something like it could be added again. even then, I'm not too worried about this here. the code is sufficiently weird that I expect people will quickly see the history and learn why it's this way
0 reposts2 likes
No replies yet.