Refactor joiner to reduce symbol bloat. #5610
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using Steven Schveighoffer's "horcrux" trick. In my range-heavy project, this single change resulted in a 50% reduction in executable size(!). This is on top of the reductions already realized by my own application of the same trick (see forum discussion below).
Relevant discussions:
This PR is just one of many to come. Some of the most common range functions in Phobos are Voldemort types, which cause nasty symbol size bloat. These PRs aim to reduce this bloat and make heavily ranged-based code more viable for D. (At least until the DMD PR is pulled. But this problem is quickly becoming a showstopper for me in the meantime, because yesterday I started running into DMD's 10MB symbol size limit. Not to mention ELF errors caused by excessively large symbols.)