Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/Ecs.CSharp.Benchmark/Contexts/ArchBaseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ArchBaseContext(ComponentType[] archetype, int amount)

World = World.Create();
World.SharedJobScheduler = JobScheduler;
World.Reserve(archetype, amount);
World.EnsureCapacity(archetype, amount);

for (int index = 0; index < amount; index++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class CreateEntityWithOneComponent
public void Arch()
{
World world = _arch.World;
world.Reserve(_archetype, EntityCount);
world.EnsureCapacity(_archetype, EntityCount);

for (int i = 0; i < EntityCount; ++i)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Arch.Core;
using Arch.Core.Utils;
using BenchmarkDotNet.Attributes;
using Ecs.CSharp.Benchmark.Contexts;
Expand All @@ -18,7 +19,7 @@ public partial class CreateEntityWithThreeComponents
public void Arch()
{
Arch.Core.World world = _arch.World;
world.Reserve(_archetype, EntityCount);
world.EnsureCapacity(_archetype, EntityCount);

for (int i = 0; i < EntityCount; ++i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial class CreateEntityWithTwoComponents
public void Arch()
{
World world = _arch.World;
world.Reserve(_archetype, EntityCount);
world.EnsureCapacity(_archetype, EntityCount);

for (int i = 0; i < EntityCount; ++i)
{
Expand Down
6 changes: 3 additions & 3 deletions source/Ecs.CSharp.Benchmark/Ecs.CSharp.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</PropertyGroup>

<ItemGroup Label="Analyzers">
<PackageReference Include="Arch.System" Version="1.0.5" />
<PackageReference Include="Arch.System.SourceGenerator" Version="1.2.1" />
<PackageReference Include="Arch.System" Version="1.1.0" />
<PackageReference Include="Arch.System.SourceGenerator" Version="2.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Myriad.ECS" Version="34.2.0" />
<PackageReference Include="Roslynator.Analyzers" Version="4.10.0" PrivateAssets="all" />
Expand All @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup Label="Ecs">
<PackageReference Include="Arch" Version="1.2.8.1-alpha" />
<PackageReference Include="Arch" Version="2.1.0" />
<PackageReference Include="Frent" Version="0.4.0-beta" />
<PackageReference Include="DefaultEcs" Version="0.17.2" />
<PackageReference Include="DefaultEcs.Analyzer" Version="0.17.0" PrivateAssets="all" />
Expand Down
2 changes: 1 addition & 1 deletion source/Ecs.CSharp.Benchmark/SystemWithOneComponent/Arch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ArchContext(int entityCount, int _)
}

private static readonly ComponentType[] _filter = [typeof(Component1)];
private static readonly QueryDescription _queryDescription = new() { All = _filter };
private static readonly QueryDescription _queryDescription = new(all: _filter);

[Context]
private readonly ArchContext _arch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ArchContext(int entityCount, int _)
}

private static readonly ComponentType[] _filter = [typeof(Component1), typeof(Component2), typeof(Component3)];
private static readonly QueryDescription _queryDescription = new() { All = _filter };
private static readonly QueryDescription _queryDescription = new(all: _filter);

[Context]
private readonly ArchContext _arch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ArchContext(int entityCount, int _)
}

private static readonly ComponentType[] _filter = [typeof(Component1), typeof(Component2)];
private static readonly QueryDescription _queryDescription = new() { All = _filter };
private static readonly QueryDescription _queryDescription = new(all: _filter);

[Context]
private readonly ArchContext _arch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ArchContext(int entityCount)

foreach (ComponentType[] archetype in archetypes)
{
World.Reserve(archetype, entityCount / 4);
World.EnsureCapacity(archetype, entityCount / 4);
}

for (int index = 0; index < entityCount; index++)
Expand All @@ -71,7 +71,7 @@ public ArchContext(int entityCount)
}

private static readonly ComponentType[] _filter = [typeof(Component1), typeof(Component2)];
private static readonly QueryDescription _queryDescription = new() { All = _filter };
private static readonly QueryDescription _queryDescription = new(all: _filter);

[Context]
private readonly ArchContext _arch;
Expand Down
Loading