Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compile time (or at least don't regress it) #26

Open
Boddlnagg opened this issue Sep 3, 2016 · 3 comments
Open

Improve compile time (or at least don't regress it) #26

Boddlnagg opened this issue Sep 3, 2016 · 3 comments

Comments

@Boddlnagg
Copy link
Collaborator

We can use this issue to track the current compile time (and memory usage) by posting the output of cargo rustc --features all -- -Z time-passes. Also don't forget to include rustc -V.

@Boddlnagg
Copy link
Collaborator Author

Here are some numbers (for 2e914f7) (without the time required to compile dependencies) showing the effect of rust-lang/rust#36524 between rustc 1.13.0-nightly (c772948b6 2016-09-20) and rustc 1.13.0-nightly (4f9812a59 2016-09-21):

time [secs] rlib size [bytes]
Before (Debug) 351.46 263.572.720
Before (Release) 506.68 154.972.432
After (Debug) 285.87 187.843.258
After (Release) 305.48 119.689.216

See details in a gist.

@Boddlnagg
Copy link
Collaborator Author

I added the #[inline] attribute to more functions in df557dd and measured again, this time comparing rustc 1.13.0-nightly (4f9812a59 2016-09-21) and rustc 1.13.0-nightly (d0623cf7b 2016-09-26)

time [secs] rlib size [bytes]
Before (Debug) 250.86 99.626.880
Before (Release) 259.66 97.387.268
After (Debug) 223.87 76.829.116
After (Release) 221.5 74.582.690

Adding more #[inline] improved everything but the item-bodies checking phase, and the latest compiler changes improved compile times further!

I have updated the gist to include the latest measurements.

@Boddlnagg
Copy link
Collaborator Author

I just did a new test run (with PR #48), and observed that the compile times slightly decreased, but the memory usage and output rlib size increased quite a bit (as always, see the gist for details):

time [secs] rlib size [bytes] max memory [MB]
2016-09-26 (Debug) 223.87 76.829.116 2396
2016-09-26 (Release) 221.5 74.582.690 2384
2017-12-20 (Debug) 214.25 117.216.458 4334
2017-12-20 (Release) 215.84 114.618.966 4325

This can have many reasons, because both rustc and winrt itself changed between those two measurements. Maybe worth investigating, but I don't have time for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant