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

Shrink metadata size #28521

Merged
merged 11 commits into from
Oct 3, 2015
Merged

Shrink metadata size #28521

merged 11 commits into from
Oct 3, 2015

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Sep 19, 2015

libcore.rlib reduced from 19121 kiB to 15934 kiB - 20% win.

The librustc encoded AST is 9013500 bytes long - for the record, librustc consists of about 2254126 characters. Might be worth looking at.

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Sep 19, 2015

@bors r+

@bors
Copy link
Contributor

bors commented Sep 19, 2015

📌 Commit 57dcaba has been approved by eddyb

@arielb1 arielb1 changed the title [WIP] shrink metadata size Shrink metadata size Sep 19, 2015
@arielb1 arielb1 changed the title Shrink metadata size [WIP] Shrink metadata size Sep 19, 2015
@arielb1
Copy link
Contributor Author

arielb1 commented Sep 19, 2015

@bors r-

still WIP

@bors
Copy link
Contributor

bors commented Sep 23, 2015

☔ The latest upstream changes (presumably #28535) made this pull request unmergeable. Please resolve the merge conflicts.

Ariel Ben-Yehuda and others added 11 commits October 1, 2015 17:43
stage1 release rlib sizes:
580890 liballoc-bb943c5a.rlib
1425558 liballoc_jemalloc-bb943c5a.rlib
10514 liballoc_system-bb943c5a.rlib
157192 libarena-bb943c5a.rlib
4316234 libcollections-bb943c5a.rlib
19580128 libcore-bb943c5a.rlib
199498 libflate-bb943c5a.rlib
249328 libfmt_macros-bb943c5a.rlib
560406 libgetopts-bb943c5a.rlib
233620 libgraphviz-bb943c5a.rlib
442964 liblibc-bb943c5a.rlib
190178 liblog-bb943c5a.rlib
778488 librand-bb943c5a.rlib
621972 librbml-bb943c5a.rlib
1415040 librustc_back-bb943c5a.rlib
38849082 librustc-bb943c5a.rlib
12862 librustc_bitflags-bb943c5a.rlib
2331690 librustc_borrowck-bb943c5a.rlib
616880 librustc_data_structures-bb943c5a.rlib
9386582 librustc_driver-bb943c5a.rlib
9600440 librustc_front-bb943c5a.rlib
1615058 librustc_lint-bb943c5a.rlib
79218480 librustc_llvm-bb943c5a.rlib
5020974 librustc_mir-bb943c5a.rlib
3535448 librustc_platform_intrinsics-bb943c5a.rlib
603640 librustc_privacy-bb943c5a.rlib
3163628 librustc_resolve-bb943c5a.rlib
14326646 librustc_trans-bb943c5a.rlib
12033174 librustc_typeck-bb943c5a.rlib
1838202 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
3056280 libserialize-bb943c5a.rlib
8954312 libstd-bb943c5a.rlib
30906736 libsyntax-bb943c5a.rlib
925480 libterm-bb943c5a.rlib
1377952 libtest-bb943c5a.rlib
it still does not *do* anything
while most of the duplication in predicates was caused by stubs,
this is still a 5% win on libcore.

567924 liballoc-bb943c5a.rlib
1425564 liballoc_jemalloc-bb943c5a.rlib
10520 liballoc_system-bb943c5a.rlib
154842 libarena-bb943c5a.rlib
4113790 libcollections-bb943c5a.rlib
18513674 libcore-bb943c5a.rlib
199466 libflate-bb943c5a.rlib
249548 libfmt_macros-bb943c5a.rlib
560488 libgetopts-bb943c5a.rlib
226772 libgraphviz-bb943c5a.rlib
442966 liblibc-bb943c5a.rlib
189884 liblog-bb943c5a.rlib
736764 librand-bb943c5a.rlib
609874 librbml-bb943c5a.rlib
1411678 librustc_back-bb943c5a.rlib
38770354 librustc-bb943c5a.rlib
12868 librustc_bitflags-bb943c5a.rlib
2327196 librustc_borrowck-bb943c5a.rlib
582178 librustc_data_structures-bb943c5a.rlib
9379344 librustc_driver-bb943c5a.rlib
9540324 librustc_front-bb943c5a.rlib
1614996 librustc_lint-bb943c5a.rlib
79217876 librustc_llvm-bb943c5a.rlib
4833518 librustc_mir-bb943c5a.rlib
3535794 librustc_platform_intrinsics-bb943c5a.rlib
603190 librustc_privacy-bb943c5a.rlib
3158032 librustc_resolve-bb943c5a.rlib
14300126 librustc_trans-bb943c5a.rlib
12024054 librustc_typeck-bb943c5a.rlib
1834852 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2926594 libserialize-bb943c5a.rlib
8780060 libstd-bb943c5a.rlib
30772000 libsyntax-bb943c5a.rlib
917984 libterm-bb943c5a.rlib
1369754 libtest-bb943c5a.rlib
we *already* need a length, so might as well use it

this saves 3% in libcore

559870 liballoc-bb943c5a.rlib
1425170 liballoc_jemalloc-bb943c5a.rlib
10120 liballoc_system-bb943c5a.rlib
152398 libarena-bb943c5a.rlib
4023670 libcollections-bb943c5a.rlib
18042746 libcore-bb943c5a.rlib
198202 libflate-bb943c5a.rlib
244412 libfmt_macros-bb943c5a.rlib
555750 libgetopts-bb943c5a.rlib
222462 libgraphviz-bb943c5a.rlib
417824 liblibc-bb943c5a.rlib
187804 liblog-bb943c5a.rlib
722742 librand-bb943c5a.rlib
604846 librbml-bb943c5a.rlib
1397814 librustc_back-bb943c5a.rlib
38382616 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2298772 librustc_borrowck-bb943c5a.rlib
570822 librustc_data_structures-bb943c5a.rlib
9361826 librustc_driver-bb943c5a.rlib
9479914 librustc_front-bb943c5a.rlib
1604576 librustc_lint-bb943c5a.rlib
79190586 librustc_llvm-bb943c5a.rlib
4783104 librustc_mir-bb943c5a.rlib
3534332 librustc_platform_intrinsics-bb943c5a.rlib
592710 librustc_privacy-bb943c5a.rlib
3123792 librustc_resolve-bb943c5a.rlib
14183434 librustc_trans-bb943c5a.rlib
11937016 librustc_typeck-bb943c5a.rlib
1830988 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2892482 libserialize-bb943c5a.rlib
8642922 libstd-bb943c5a.rlib
30590774 libsyntax-bb943c5a.rlib
912678 libterm-bb943c5a.rlib
1369754 libtest-bb943c5a.rlib
another 1% improvement in libcore size - also 1% in librustc

550076 liballoc-bb943c5a.rlib
1425150 liballoc_jemalloc-bb943c5a.rlib
10100 liballoc_system-bb943c5a.rlib
149372 libarena-bb943c5a.rlib
3964144 libcollections-bb943c5a.rlib
17744342 libcore-bb943c5a.rlib
197420 libflate-bb943c5a.rlib
241582 libfmt_macros-bb943c5a.rlib
550560 libgetopts-bb943c5a.rlib
219444 libgraphviz-bb943c5a.rlib
402668 liblibc-bb943c5a.rlib
187158 liblog-bb943c5a.rlib
704588 librand-bb943c5a.rlib
594522 librbml-bb943c5a.rlib
1392516 librustc_back-bb943c5a.rlib
38196500 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2286918 librustc_borrowck-bb943c5a.rlib
561714 librustc_data_structures-bb943c5a.rlib
9356400 librustc_driver-bb943c5a.rlib
9378650 librustc_front-bb943c5a.rlib
1603680 librustc_lint-bb943c5a.rlib
79184908 librustc_llvm-bb943c5a.rlib
4746824 librustc_mir-bb943c5a.rlib
3532474 librustc_platform_intrinsics-bb943c5a.rlib
592664 librustc_privacy-bb943c5a.rlib
3114986 librustc_resolve-bb943c5a.rlib
14153174 librustc_trans-bb943c5a.rlib
11918356 librustc_typeck-bb943c5a.rlib
1669986 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2836912 libserialize-bb943c5a.rlib
8549994 libstd-bb943c5a.rlib
30399156 libsyntax-bb943c5a.rlib
907058 libterm-bb943c5a.rlib
3% win on libcore

528828 liballoc-bb943c5a.rlib
1425126 liballoc_jemalloc-bb943c5a.rlib
10090 liballoc_system-bb943c5a.rlib
144904 libarena-bb943c5a.rlib
3773896 libcollections-bb943c5a.rlib
17075242 libcore-bb943c5a.rlib
195770 libflate-bb943c5a.rlib
234702 libfmt_macros-bb943c5a.rlib
536342 libgetopts-bb943c5a.rlib
212028 libgraphviz-bb943c5a.rlib
397068 liblibc-bb943c5a.rlib
185038 liblog-bb943c5a.rlib
680782 librand-bb943c5a.rlib
577574 librbml-bb943c5a.rlib
1381992 librustc_back-bb943c5a.rlib
37554736 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2257392 librustc_borrowck-bb943c5a.rlib
533858 librustc_data_structures-bb943c5a.rlib
9338878 librustc_driver-bb943c5a.rlib
8960016 librustc_front-bb943c5a.rlib
1594212 librustc_lint-bb943c5a.rlib
79159342 librustc_llvm-bb943c5a.rlib
4590656 librustc_mir-bb943c5a.rlib
3529292 librustc_platform_intrinsics-bb943c5a.rlib
590688 librustc_privacy-bb943c5a.rlib
3084134 librustc_resolve-bb943c5a.rlib
14032890 librustc_trans-bb943c5a.rlib
11833852 librustc_typeck-bb943c5a.rlib
1641496 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2693764 libserialize-bb943c5a.rlib
8266920 libstd-bb943c5a.rlib
29573790 libsyntax-bb943c5a.rlib
895484 libterm-bb943c5a.rlib
a 5% win on libcore

512576 liballoc-bb943c5a.rlib
1425106 liballoc_jemalloc-bb943c5a.rlib
10070 liballoc_system-bb943c5a.rlib
141332 libarena-bb943c5a.rlib
3611586 libcollections-bb943c5a.rlib
16293400 libcore-bb943c5a.rlib
195018 libflate-bb943c5a.rlib
231940 libfmt_macros-bb943c5a.rlib
532704 libgetopts-bb943c5a.rlib
208094 libgraphviz-bb943c5a.rlib
383522 liblibc-bb943c5a.rlib
183786 liblog-bb943c5a.rlib
658332 librand-bb943c5a.rlib
567676 librbml-bb943c5a.rlib
1376114 librustc_back-bb943c5a.rlib
37134688 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2241942 librustc_borrowck-bb943c5a.rlib
513598 librustc_data_structures-bb943c5a.rlib
9340348 librustc_driver-bb943c5a.rlib
8880472 librustc_front-bb943c5a.rlib
1590548 librustc_lint-bb943c5a.rlib
79149202 librustc_llvm-bb943c5a.rlib
4536740 librustc_mir-bb943c5a.rlib
3528866 librustc_platform_intrinsics-bb943c5a.rlib
588514 librustc_privacy-bb943c5a.rlib
3068562 librustc_resolve-bb943c5a.rlib
13982508 librustc_trans-bb943c5a.rlib
11799790 librustc_typeck-bb943c5a.rlib
1637532 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2649520 libserialize-bb943c5a.rlib
8095050 libstd-bb943c5a.rlib
29391260 libsyntax-bb943c5a.rlib
891210 libterm-bb943c5a.rlib
It is redundant with the item type. This is not much of a win,
as there are really not *that* many methods, but it makes the code
uglier.
there are no type parameter defs in the relevant range
rlib sizes:
1445222 liballoc_jemalloc-bb943c5a.rlib
10664 liballoc_system-bb943c5a.rlib
143592 libarena-bb943c5a.rlib
3639102 libcollections-bb943c5a.rlib
16316910 libcore-bb943c5a.rlib
214154 libflate-bb943c5a.rlib
231440 libfmt_macros-bb943c5a.rlib
536976 libgetopts-bb943c5a.rlib
209672 libgraphviz-bb943c5a.rlib
408008 liblibc-bb943c5a.rlib
189610 liblog-bb943c5a.rlib
662184 librand-bb943c5a.rlib
605112 librbml-bb943c5a.rlib
1397820 librustc_back-bb943c5a.rlib
38383772 librustc-bb943c5a.rlib
12842 librustc_bitflags-bb943c5a.rlib
2297822 librustc_borrowck-bb943c5a.rlib
571064 librustc_data_structures-bb943c5a.rlib
9356542 librustc_driver-bb943c5a.rlib
9477226 librustc_front-bb943c5a.rlib
1605698 librustc_lint-bb943c5a.rlib
77111720 librustc_llvm-bb943c5a.rlib
4783848 librustc_mir-bb943c5a.rlib
3534256 librustc_platform_intrinsics-bb943c5a.rlib
593038 librustc_privacy-bb943c5a.rlib
3122202 librustc_resolve-bb943c5a.rlib
14185212 librustc_trans-bb943c5a.rlib
11940328 librustc_typeck-bb943c5a.rlib
1634264 librustc_unicode-bb943c5a.rlib
15564160 librustdoc-bb943c5a.rlib
8153964 libstd-bb943c5a.rlib
30589338 libsyntax-bb943c5a.rlib
897110 libterm-bb943c5a.rlib
1360662 libtest-bb943c5a.rlib
@arielb1 arielb1 changed the title [WIP] Shrink metadata size Shrink metadata size Oct 2, 2015
@arielb1
Copy link
Contributor Author

arielb1 commented Oct 2, 2015

[updated]

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Oct 3, 2015

@bors r+

@bors
Copy link
Contributor

bors commented Oct 3, 2015

📌 Commit eae41d3 has been approved by eddyb

bors added a commit that referenced this pull request Oct 3, 2015
libcore.rlib reduced from 19121 kiB to 15934 kiB - 20% win.

The librustc encoded AST is 9013500 bytes long - for the record, librustc consists of about 2254126 characters. Might be worth looking at.

r? @eddyb
@bors
Copy link
Contributor

bors commented Oct 3, 2015

⌛ Testing commit eae41d3 with merge 3e06daa...

@bors bors merged commit eae41d3 into rust-lang:master Oct 3, 2015
@bluss bluss added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 4, 2015
@bluss
Copy link
Member

bluss commented Oct 4, 2015

relnotes: Just nice to brag about improvements like this

@brson
Copy link
Contributor

brson commented Oct 10, 2015

Nice wins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants