mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-04 23:06:05 +00:00
Implement Elevation
This commit is contained in:
17
src/test/java/NoiseInstancePerformanceTest.java
Normal file
17
src/test/java/NoiseInstancePerformanceTest.java
Normal file
@@ -0,0 +1,17 @@
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.polydev.gaea.math.FastNoiseLite;
|
||||
|
||||
public class NoiseInstancePerformanceTest {
|
||||
@Test
|
||||
public void performance() {
|
||||
FastNoiseLite noiseLite = new FastNoiseLite(2403);
|
||||
long l = System.nanoTime();
|
||||
for(int i = 0; i < 10000000; i++) noiseLite.getNoise(i, i);
|
||||
System.out.println("No instantiation: " + (System.nanoTime() - l) / 1000000 + "ms");
|
||||
for(int i = 0; i < 10000000; i++) {
|
||||
FastNoiseLite noiseLite1 = new FastNoiseLite(2403);
|
||||
noiseLite1.getNoise(i, i);
|
||||
}
|
||||
System.out.println("Instantiation: " + (System.nanoTime() - l) / 1000000 + "ms");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user