Perf plot
This commit is contained in:
committed by
Linus Baumberger
parent
ca969564a6
commit
e7af3103e8
@@ -0,0 +1,61 @@
|
||||
# const int n_p_pad = (n_p + 15) & ~15;
|
||||
|
||||
# ADDs: n_iter * (
|
||||
# n_p * 36 +
|
||||
# n_p * n_p_pad * 29 +
|
||||
# n_p * board.n_obstacles * 10 +
|
||||
# n_p * 11
|
||||
# )
|
||||
|
||||
# MULTs: n_iter * (
|
||||
# n_p * 4 +
|
||||
# n_p * n_p_pad * 40 +
|
||||
# n_p * board.n_obstacles * 13 +
|
||||
# n_p * 30
|
||||
# )
|
||||
|
||||
# DIVs: n_iter * (
|
||||
# n_p * n_p_pad +
|
||||
# n_p * board.n_obstacles
|
||||
# )
|
||||
|
||||
# SQRTs: n_iter * (
|
||||
# n_p * n_p_pad * 3 +
|
||||
# n_p * board.n_obstacles +
|
||||
# n_p
|
||||
# )
|
||||
|
||||
# EXPs: n_iter * n_p * board.n_obstacles
|
||||
|
||||
|
||||
def adds(n_iter: int, n_p: int, n_obs: int = 2) -> int:
|
||||
n_p_pad = (n_p + 15) & ~15
|
||||
return int(n_iter *
|
||||
(n_p * 36 + n_p * n_p_pad * 29 + n_p * n_obs * 10 + n_p * 11))
|
||||
|
||||
|
||||
def mults(n_iter: int, n_p: int, n_obs: int = 2) -> int:
|
||||
n_p_pad = (n_p + 15) & ~15
|
||||
return int(n_iter *
|
||||
(n_p * 4 + n_p * n_p_pad * 40 + n_p * n_obs * 13 + n_p * 30))
|
||||
|
||||
|
||||
def divs(n_iter: int, n_p: int, n_obs: int = 2) -> int:
|
||||
n_p_pad = (n_p + 15) & ~15
|
||||
return int(n_iter * (n_p * n_p_pad + n_p * n_obs))
|
||||
|
||||
|
||||
def sqrts(n_iter: int, n_p: int, n_obs: int = 2) -> int:
|
||||
n_p_pad = (n_p + 15) & ~15
|
||||
return int(n_iter * (n_p * n_p_pad * 3 + n_p * n_obs + n_p))
|
||||
|
||||
|
||||
def exps(n_iter: int, n_p: int, n_obs: int = 2) -> int:
|
||||
n_p_pad = (n_p + 15) & ~15
|
||||
return int(n_iter * 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
|
||||
Reference in New Issue
Block a user