-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Improve perf for Index based span indexers #21196
Conversation
First, evaluate the actual index before invoking the underlying int indexer, so that the jit doesn't think the span is address taken. Second, improve the jit's ability to remove some redundant comparisions like those that arise in computing the actual index.
|
@briansull PTAL jit-diffs shows impact mainly to the new Performance on a simple benchmark (see dotnet/corefx#33376) improved from ~80ms to ~57ms, matching "equivalent" indexer using a discrete int and bool. (For reference, the int indexer is around 35ms). |
|
FWIW I apparently can't extend the span indexer bench to include these new |
|
OSX failure is likely unrelated. Will see if it repros.... @dotnet-bot retest OSX10.12 x64 Checked Innerloop Build and Test |
|
The Span changes looks good to me. I'll others review the jit changes as I am not familiar with. |
briansull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good
src/jit/assertionprop.cpp
Outdated
| return optAssertionProp_Update(newTree, tree, stmt); | ||
| } | ||
|
|
||
| // Else if we have an equality check involving a local, look for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point the comment should read:
Else check if we have an equality check involving a local
Or you could move this comment down to line 3123
First, evaluate the actual index before invoking the underlying int indexer, so that the jit doesn't think the span is address taken. Second, improve the jit's ability to remove some redundant comparisons like those that arise in computing the actual index. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
First, evaluate the actual index before invoking the underlying int indexer, so that the jit doesn't think the span is address taken. Second, improve the jit's ability to remove some redundant comparisons like those that arise in computing the actual index. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
First, evaluate the actual index before invoking the underlying int indexer, so that the jit doesn't think the span is address taken. Second, improve the jit's ability to remove some redundant comparisons like those that arise in computing the actual index. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
First, evaluate the actual index before invoking the underlying int indexer, so that the jit doesn't think the span is address taken. Second, improve the jit's ability to remove some redundant comparisons like those that arise in computing the actual index. Commit migrated from dotnet/coreclr@b01b2b8
First, evaluate the actual index before invoking the underlying int indexer,
so that the jit doesn't think the span is address taken.
Second, improve the jit's ability to remove some redundant comparisions like
those that arise in computing the actual index.