-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove obsolete FastList<T> #153
Comments
Yep, I can take a look at some point within the next month. It should be as easy as changing the types to |
So apparently not as easy as I thought. There is something Im missing in regards to memory allocations with my currebt changes but Ill take another look when my head is right. |
Thank you. Do you mean that changing types to |
No, both should be fairly straight forward. I think my issue has to do with some of the Array extensions in use. I switched the |
Nice, at least, this should help to refactor FastList in other places in Stride itself as well 🙂 |
Honestly, the more I look at this the more I think I was too hasty in the obsoletion PR for Stride. I could make this all work but the |
Well, I think as you said the |
The problem came down to how nice it was to be able to have the underlying array within The best example is how silly it feels to get the public Span<T> AsSpan()
{
return new Span<T>(Items);
} Also looking at some of the methods within example: public int FindLastIndex(int startIndex, int count, Predicate<T> match)
{
var num = startIndex - count;
for (var i = startIndex; i > num; i--)
{
if (match(Items[i]))
{
return i;
}
}
return -1;
} to public int FindLastIndex(int startIndex, int count, Predicate<T> match)
{
var itemsSpan = AsSpan();
var num = startIndex - count;
for (var i = startIndex; i > num; i--)
{
if (match(itemsSpan[i]))
{
return i;
}
}
return -1;
} I need to do some benchmarking but in my previous tests when I first deprecated the class it was pretty simple. I started a chat within the Discord collaborators chat as well to try and get more opinions on it. |
May I assign it to you?
The text was updated successfully, but these errors were encountered: