repo.or.cz
/
sympy.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Initial SymPy benchmark suite
[sympy.git]
/
sympy
/
core
/
benchmarks
/
bench_arit.py
blob
53a62297162d5c845a1fa019696bc834afb2a3ca
1
from
sympy
.
core
import
Add
,
Mul
,
symbols
2
3
x
,
y
,
z
=
symbols
(
'xyz'
)
4
5
def
timeit_neg
():
6
-
x
7
8
def
timeit_Add_x1
():
9
x
+
1
10
11
def
timeit_Add_1x
():
12
1
+
x
13
14
def
timeit_Add_x05
():
15
x
+
0.5
16
17
def
timeit_Add_xy
():
18
x
+
y
19
20
def
timeit_Add_xyz
():
21
Add
(*[
x
,
y
,
z
])
22
23
def
timeit_Mul_xy
():
24
x
*
y
25
26
def
timeit_Mul_xyz
():
27
Mul
(*[
x
,
y
,
z
])
28
29
def
timeit_Div_xy
():
30
x
/
y
31
32
def
timeit_Div_2y
():
33
2
/
y