diff --git a/Flocking/Ark/Flocking.jl b/Flocking/Ark/Flocking.jl index 4d9aacc..c1438c8 100644 --- a/Flocking/Ark/Flocking.jl +++ b/Flocking/Ark/Flocking.jl @@ -109,7 +109,7 @@ function flocking_step!(world::World, rng) entities = buffers.entities shuffle!(rng, entities) - for entity in entities + @unchecked for entity in entities pos_comp, vel_comp, param = get_components(world, entity, (Position, Velocity, BirdParams)) pos, vel = pos_comp.p, vel_comp.v diff --git a/Project.toml b/Project.toml index 2c7921f..f9d64a3 100755 --- a/Project.toml +++ b/Project.toml @@ -8,4 +8,5 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] +Ark = "0.4" PrettyTables = "2" diff --git a/README.md b/README.md index 8d9f501..ad78595 100755 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ These are the results of the latest comparison: | Model/Framework | Agents.jl 6.2.10 | Ark.jl 0.3.2 | MASON 22.0 | Netlogo 6.4.0 | Mesa 3.2.0 | |:------------------:|:------------------:|:--------------:|:------------:|:---------------:|:------------:| -| WolfSheep-small (Time-Ratio) | 1.0 | **0.39** | 5.29 | 9.94 | 9.38 | -| WolfSheep-large (Time-Ratio) | 1.0 | **0.24** | 7.8 | 4.81 | 3.28 | +| WolfSheep-small (Time-Ratio) | 1.0 | **0.34** | 5.29 | 9.94 | 9.38 | +| WolfSheep-large (Time-Ratio) | 1.0 | **0.14** | 7.8 | 4.81 | 3.28 | | WolfSheep (Lines of Code) | **73** | 149 | 202 | 137 (871) | 118 | -| Flocking-small (Time-Ratio) | 1.0 | **0.75** | 1.42 | 15.37 | 159.29 | -| Flocking-large (Time-Ratio) | 1.0 | **0.4** | 0.61 | 19.14 | 59.5 | +| Flocking-small (Time-Ratio) | 1.0 | **0.73** | 1.42 | 15.37 | 159.29 | +| Flocking-large (Time-Ratio) | 1.0 | **0.36** | 0.61 | 19.14 | 59.5 | | Flocking (Lines of Code) | **42** | 137 | 159 | 82 (689) | 94 | -| Schelling-small (Time-Ratio) | 1.0 | **0.67** | 1.19 | 11.39 | 29.73 | -| Schelling-large (Time-Ratio) | 1.0 | **0.68** | 1.51 | 14.33 | 26.66 | +| Schelling-small (Time-Ratio) | 1.0 | **0.61** | 1.19 | 11.39 | 29.73 | +| Schelling-large (Time-Ratio) | 1.0 | **0.59** | 1.51 | 14.33 | 26.66 | | Schelling (Lines of Code) | **26** | 78 | 129 | 54 (739) | 33 | ## How it works @@ -98,3 +98,4 @@ If you are using WSL make sure that you move to a folder inside the subsystem be + diff --git a/Schelling/Ark/Schelling.jl b/Schelling/Ark/Schelling.jl index 9e2efa5..07e20c5 100644 --- a/Schelling/Ark/Schelling.jl +++ b/Schelling/Ark/Schelling.jl @@ -58,7 +58,7 @@ function schelling_step!(world::World, rng) all_entities = buffers.entities shuffle!(rng, all_entities) - @inbounds for entity in all_entities + @inbounds @unchecked for entity in all_entities pos, group = get_components(world, entity, (Position, Group)) count_neighbors_same_group = 0 diff --git a/WolfSheep/Ark/WolfSheep.jl b/WolfSheep/Ark/WolfSheep.jl index f50ac2c..6f58ea6 100644 --- a/WolfSheep/Ark/WolfSheep.jl +++ b/WolfSheep/Ark/WolfSheep.jl @@ -86,7 +86,7 @@ function swap_remove!(v::Vector{Entity}, x::Entity) end function sheep_step!(world::World, rng, entities, params, grass, sheep_grid) - for entity in entities + @unchecked for entity in entities pos, energy_comp = get_components(world, entity, (Position, Energy)) energy = energy_comp.e @@ -118,7 +118,7 @@ function sheep_step!(world::World, rng, entities, params, grass, sheep_grid) end function wolf_step!(world::World, rng, entities, params, sheep_grid) - for entity in entities + @unchecked for entity in entities pos, energy_comp = get_components(world, entity, (Position, Energy)) energy = energy_comp.e