-
Notifications
You must be signed in to change notification settings - Fork 345
Performance regression after adding segment type switch #2046
Comments
Aside, this might be helpful https://github.com/dotnet/coreclr/issues/15755
|
What was the TryGet change? |
Adding 3 possible types of segments (Array, OwnedMemory and IBufferList) |
@benaadams yeah, it generates pretty bad code around structs, and also bunch of calls to coreclr (IsArray, IsInstanceOfClass) |
Pattern matching the different types? |
I talked with @pakrym and he will try to use the high order bit in one of the Position's ints to identify the IBufferList case. Maybe we can even use the other bit to identify T[] |
Lose 2 bits; is still 1GB; if you need more you aren't segmenting correctly :) |
@benaadams Those of us with email notifications can see your ninja edits 😆 . |
@pakrym, has this issue been resolved? Can it be closed? |
Yes. And we shouldn't track it here anymore. |
We've seen 10% regression in kestrel and the source seems to be that multiple ReadOnlyBuffer methods became less efficient after the change namely:
Seek
(because of CheckBounds)TryGet
Reader.MoveNext
- I suspect mostly because of TryGetThe text was updated successfully, but these errors were encountered: