Skip to content
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
JonHanna:simpler_lifted_relational
Feb 17, 2017
Merged

Simpler lifted comparison operation compilation in S.L.Expressions#15941
VSadov merged 1 commit intodotnet:masterfrom
JonHanna:simpler_lifted_relational

Conversation

@JonHanna
Copy link
Copy Markdown
Contributor

@JonHanna JonHanna commented Feb 8, 2017

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.

These are close to what how the equivalent C# and VB respectively are compiled.

@JonHanna JonHanna force-pushed the simpler_lifted_relational branch from 512bbfb to 3b2771d Compare February 8, 2017 10:37
@JonHanna JonHanna force-pushed the simpler_lifted_relational branch 2 times, most recently from 7cd2416 to 0df0f85 Compare February 10, 2017 22:06
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.
@JonHanna JonHanna force-pushed the simpler_lifted_relational branch from 0df0f85 to d64fa5d Compare February 11, 2017 16:05
Copy link
Copy Markdown
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!!
LGTM

@VSadov
Copy link
Copy Markdown
Member

VSadov commented Feb 17, 2017

It seems that Roslyn uses conditional branches where unconditional bool logic should be faster and more optimizable.

@VSadov VSadov merged commit b9d21f9 into dotnet:master Feb 17, 2017
@JonHanna JonHanna deleted the simpler_lifted_relational branch February 17, 2017 21:23
@JonHanna
Copy link
Copy Markdown
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.

@karelz karelz modified the milestone: 2.0.0 Feb 22, 2017
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants