Skip to content

Commit

Permalink
Merge pull request #102 from bjodah/bench-Add
Browse files Browse the repository at this point in the history
Add benchmark of Add
  • Loading branch information
oscarbenjamin authored Nov 14, 2024
2 parents 32a1d61 + a8bfd5e commit 68fab81
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions benchmarks/core/arit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
p = 3*x**2*y*z**7 + 7*x*y*z**2 + 4*x + x*y**4
e = (x + y + z + 1)**32

a5000 = symbols("a0:5000")
sum_a5000 = Add(*a5000);


class Time_Arit:
def time_neg(self):
-x
Expand All @@ -27,6 +31,10 @@ def time_Add_xy(self):
def time_Add_xyz(self):
Add(*[x, y, z])

def time_Add_thousands(self):
# from https://github.com/sympy/sympy/pull/27254
sum_a5000 + a5000[0]

def time_Mul_xy(self):
x*y

Expand Down

0 comments on commit 68fab81

Please sign in to comment.