Avoid generating lots of small temporary functions.#50
Merged
pbackus merged 1 commit intopbackus:masterfrom Nov 27, 2020
Merged
Conversation
Owner
|
The changes to |
- Move destructor lambda into global scope (allow instance reuse) - Move `stride` template into global scope (allow instance reuse) - `getValues` yields a string of an argument list instead of a value tuple. Effects: - slightly slower in normal operation - enormously faster in degenerate cases (large number of types, `-O -inline`) due to avoiding overloading the inliner - smaller object file size.
5dbf6cd to
88b527b
Compare
Contributor
Author
|
The lack of |
Owner
|
Tagged as |
pbackus
added a commit
to pbackus/phobos
that referenced
this pull request
Dec 4, 2020
Corresponds to the following sumtype commits: - 97fc38e4ac6c18e049c90f5a7657997155af198e - 7e6ee90e4b8bc8bdda65af8c24c945aa3577e5c6 - 2032c14b0a7d29c445700068c92e513b2ad0619c - dc461a4c2c1644b0073c57c5d87f251cd2ecb70a - 72b4936d92875583eeb1454d70f76f3309930e85 See pbackus/sumtype#50 for more details.
pbackus
added a commit
that referenced
this pull request
Jan 14, 2021
pbackus
added a commit
to pbackus/phobos
that referenced
this pull request
Jan 27, 2021
Corresponds to the following sumtype commits: - 97fc38e4ac6c18e049c90f5a7657997155af198e - 7e6ee90e4b8bc8bdda65af8c24c945aa3577e5c6 - 2032c14b0a7d29c445700068c92e513b2ad0619c - dc461a4c2c1644b0073c57c5d87f251cd2ecb70a - 72b4936d92875583eeb1454d70f76f3309930e85 See pbackus/sumtype#50 for more details.
pbackus
added a commit
to pbackus/phobos
that referenced
this pull request
Feb 20, 2021
Corresponds to the following sumtype commits: - 97fc38e4ac6c18e049c90f5a7657997155af198e - 7e6ee90e4b8bc8bdda65af8c24c945aa3577e5c6 - 2032c14b0a7d29c445700068c92e513b2ad0619c - dc461a4c2c1644b0073c57c5d87f251cd2ecb70a - 72b4936d92875583eeb1454d70f76f3309930e85 See pbackus/sumtype#50 for more details.
Owner
|
This PR introduced a regression (#65). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
stridetemplate into global scope (allow instance reuse)getValuesyields a string of an argument list instead of a value tuple.Effects:
-O -inline) due to avoiding overloading the inlinerTo reproduce the degenerate case, try with this test program (remember
-O -inline):Adjust the iota to make things slower. Note that we have a 21-type SumType in practice - this is not academic! If you set iota to 21, then in the stock 1.0.0 version the optimizer will run for at least five minutes. (At least that's where I gave up.)