mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Removed unnecessary TODOs
This commit is contained in:
parent
4417a83424
commit
d468a4f328
12 changed files with 3 additions and 82 deletions
|
|
@ -1,8 +1,6 @@
|
|||
import arc.*;
|
||||
import arc.backend.headless.*;
|
||||
import arc.files.*;
|
||||
import arc.func.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
|
|
@ -508,72 +506,6 @@ public class ApplicationTests{
|
|||
world.tile(0, 0).build.acceptStack(Items.copper, 1000, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
void indexingBasic(){
|
||||
resetWorld();
|
||||
SaveIO.load(Core.files.internal("77.msav"));
|
||||
|
||||
//test basic method.
|
||||
Rand r = new Rand(0);
|
||||
Building[] res = {null};
|
||||
|
||||
Cons<Building> assigner = t -> res[0] = t;
|
||||
|
||||
int iterations = 100;
|
||||
|
||||
r.setSeed(0);
|
||||
|
||||
//warmup.
|
||||
for(int i = 0; i < iterations; i++){
|
||||
int x = r.random(0, world.width()), y = r.random(0, world.height());
|
||||
float range = r.random(tilesize * 30);
|
||||
|
||||
indexer.eachBlock(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
|
||||
}
|
||||
|
||||
//TODO impl
|
||||
/*
|
||||
r.setSeed(0);
|
||||
|
||||
for(int i = 0; i < iterations; i++){
|
||||
int x = r.random(0, world.width()), y = r.random(0, world.height());
|
||||
float range = r.random(tilesize * 30);
|
||||
|
||||
indexer.eachBlock2(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
|
||||
}*/
|
||||
|
||||
//benchmark.
|
||||
|
||||
r.setSeed(0);
|
||||
|
||||
Time.mark();
|
||||
|
||||
for(int i = 0; i < iterations; i++){
|
||||
int x = r.random(0, world.width()), y = r.random(0, world.height());
|
||||
float range = r.random(tilesize * 30);
|
||||
|
||||
indexer.eachBlock(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
|
||||
}
|
||||
|
||||
Log.info("Time for basic indexing: @", Time.elapsed());
|
||||
|
||||
r.setSeed(0);
|
||||
|
||||
/*
|
||||
Time.mark();
|
||||
|
||||
for(int i = 0; i < iterations; i++){
|
||||
int x = r.random(0, world.width()), y = r.random(0, world.height());
|
||||
float range = r.random(tilesize * 30);
|
||||
|
||||
indexer.eachBlock2(Team.sharded, x * tilesize, y * tilesize, range, t -> true, assigner);
|
||||
}
|
||||
|
||||
Log.info("Time for quad: {0}", Time.elapsed());
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void conveyorBench(){
|
||||
int[] itemsa = {0};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue