Skip to content

Commit 3a202bc

Browse files
committed
PERF: add asv benchmarks for .dot()
1 parent d140359 commit 3a202bc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

asv_bench/benchmarks/binary_ops.py

+13
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def setup(self):
5252
np.iinfo(np.int16).max,
5353
size=(N, N)))
5454

55+
self.s = Series(np.random.randn(N))
56+
5557
# Division
5658

5759
def time_frame_float_div(self):
@@ -74,6 +76,17 @@ def time_frame_int_mod(self):
7476
def time_frame_float_mod(self):
7577
self.df % self.df2
7678

79+
# Dot product
80+
81+
def time_frame_dot(self):
82+
self.df.dot(self.df2)
83+
84+
def time_series_dot(self):
85+
self.s.dot(self.s)
86+
87+
def time_frame_series_dot(self):
88+
self.df.dot(self.s)
89+
7790

7891
class Timeseries(object):
7992

0 commit comments

Comments
 (0)