Skip to content

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.

@BrzVlad BrzVlad force-pushed the feature-interp-span-ctor2 branch from dd80b7c to 1bb4b05 Compare July 14, 2020 11:16
BrzVlad added 4 commits July 15, 2020 15:36
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.
@BrzVlad BrzVlad force-pushed the feature-interp-span-ctor2 branch from db64b2f to d4f6b0c Compare July 15, 2020 12:37
@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
Contributor

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

@steveharter
Copy link
Contributor

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.

6 participants