Perf plot

This commit is contained in:
[Quy Anh] «Elliot» Nguyen
2026-06-18 11:59:50 +02:00
committed by Linus Baumberger
parent ca969564a6
commit e7af3103e8
153 changed files with 22042 additions and 24220 deletions
+58
View File
@@ -0,0 +1,58 @@
# ADDs: n_iter * (
# n_p * 4 +
# n_p * (n_p - 1) * 14 +
# n_p * board.n_obstacles * 12 +
# n_p * 7
# )
# MULTs: n_iter * (
# n_p * 4 +
# n_p * (n_p - 1) * 23 +
# n_p * board.n_obstacles * 18 +
# n_p * 16
# )
# DIVs: n_iter * (
# n_p * (n_p - 1) +
# n_p * board.n_obstacles +
# n_p * 2
# )
# SQRTs: n_iter * (
# n_p * (n_p - 1) * 4 +
# n_p * board.n_obstacles * 2 +
# n_p * 3
# )
# EXPs (fast_exp, LUT): n_iter * (
# n_p * (n_p - 1) +
# n_p * board.n_obstacles
# )
def adds(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return int(n_iter * (n_p * 4 + n_p *
(n_p - 1) * 14 + n_p * n_obs * 12 + n_p * 7))
def mults(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return int(n_iter * (n_p * 4 + n_p *
(n_p - 1) * 23 + n_p * n_obs * 18 + n_p * 16))
def divs(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return int(n_iter * (n_p * (n_p - 1) + n_p * n_obs + n_p * 2))
def sqrts(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return int(n_iter * (n_p * (n_p - 1) * 4 + n_p * n_obs * 2 + n_p * 3))
def exps(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return int(n_iter * (n_p * (n_p - 1) + n_p * n_obs))
def total(n_iter: int, n_p: int, n_obs: int = 2) -> int:
return adds(n_iter, n_p, n_obs) + mults(n_iter, n_p, n_obs) + divs(
n_iter, n_p, n_obs) + sqrts(n_iter, n_p,
n_obs) + exps(n_iter, n_p, n_obs) * 30