Skip to content

Commit 10cfbf8

Browse files
Create perlin speed test.py
1 parent c91848e commit 10cfbf8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

experiments/perlin speed test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pmma
2+
3+
pmma.init(use_c_acceleration=False)
4+
5+
import time
6+
7+
noise = pmma.Perlin()
8+
9+
while True:
10+
total_time = 0
11+
for i in range(1_000_000):
12+
s = time.perf_counter()
13+
noise.generate_1D_perlin_noise(i)
14+
e = time.perf_counter()
15+
total_time += e - s
16+
print(1/(total_time/i))

0 commit comments

Comments
 (0)