Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[interp] Intrinsify span ctor #39195

Merged
merged 4 commits into from
Jul 15, 2020
Merged

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Jul 13, 2020

No description provided.

@ghost
Copy link

ghost commented Jul 13, 2020

Tagging subscribers to this area: @BrzVlad, @lewurm
Notify danmosemsft if you want to be subscribed.

It is heavily used in bcl for static read only spans.

In the future we should do copy propagation through its fields so we avoid creating the span in the first place and remove other unecessary opcodes.
@SamMonoRT
Copy link
Member

What kind of perf gain are we looking at with this change ?

@BrzVlad BrzVlad merged commit ef2ecfd into dotnet:master Jul 15, 2020
@steveharter
Copy link
Member

I assume this would also help methods like Slice() since that returns a new Span.

@steveharter
Copy link
Member

Here's a simple benchmark doing new Span<byte>(bytes).Slice() (100,000,000 iterations)

Core JIT Mono JIT Mono interpreter
23ms 652 (28x slower than Core) 7597 (330x slower than Core)

@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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.

None yet

6 participants