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

Revert "Fix IBindableList.GetEnumerator() boxing and allocating" #6162

Merged
merged 2 commits into from Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 0 additions & 15 deletions osu.Framework.Benchmarks/BenchmarkBindableList.cs
Expand Up @@ -10,7 +10,6 @@ namespace osu.Framework.Benchmarks
public class BenchmarkBindableList
{
private readonly BindableList<int> list = new BindableList<int>();
private IBindableList<int> iList => list;

[GlobalSetup]
public void GlobalSetup()
Expand All @@ -32,19 +31,5 @@ public int Enumerate()

return result;
}

[Benchmark]
public int EnumerateInterface()
{
int result = 0;

for (int i = 0; i < 100; i++)
{
foreach (int val in iList)
result += val;
}

return result;
}
}
}
2 changes: 0 additions & 2 deletions osu.Framework/Bindables/IBindableList.cs
Expand Up @@ -37,7 +37,5 @@ sealed IBindableList<T> BindTarget

/// <inheritdoc cref="IBindable.GetBoundCopy"/>
IBindableList<T> GetBoundCopy();

new List<T>.Enumerator GetEnumerator();
}
}