This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Simpler lifted comparison operation compilation in S.L.Expressions#15941
Merged
VSadov merged 1 commit intodotnet:masterfrom Feb 17, 2017
Merged
Simpler lifted comparison operation compilation in S.L.Expressions#15941VSadov merged 1 commit intodotnet:masterfrom
VSadov merged 1 commit intodotnet:masterfrom
Conversation
512bbfb to
3b2771d
Compare
7cd2416 to
0df0f85
Compare
Split into separate methods for lifted and lifted-to-null comparisons, and simplify each. Lifted now does no branching, and with shorter IL. Lifted-to-null also shorter and also creates a null response through initobj instead of pushing a null and unboxing.
0df0f85 to
d64fa5d
Compare
Member
|
It seems that Roslyn uses conditional branches where unconditional bool logic should be faster and more optimizable. |
Contributor
Author
|
Yeah at first that made me second guess this and I was going to copy Roslyn more closely, but I can't see how this isn't at least as good, if not slightly preferable. |
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
…elational Simpler lifted comparison operation compilation in S.L.Expressions Commit migrated from dotnet/corefx@b9d21f9
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Split into separate methods for lifted and lifted-to-null comparisons, and simplify each. Lifted now does no branching, and with shorter IL.
Lifted-to-null also shorter and also creates a null response through
initobjinstead of pushing a null and unboxing.These are close to what how the equivalent C# and VB respectively are compiled.