Repository: modin-project/modin

Issue:
[ASV] port align and DropDuplicates benchmarks from pandas github
Have to add ASV benchmarks related which does the following actions

1)Dataframe.align and Dataframe.reindex

2)drop_duplicates method for Dataframe and Series. 
        - With separate benchmarks for inplace argument true and false 
        - With different types of data such as  string,integer ,nan


Discussion:

Resolving patch:
diff --git a/asv_bench/benchmarks/benchmarks.py b/asv_bench/benchmarks/benchmarks.py
--- a/asv_bench/benchmarks/benchmarks.py
+++ b/asv_bench/benchmarks/benchmarks.py
@@ -21,6 +21,7 @@
 
 import numpy as np
 import pandas._testing as tm
+import math
 
 from .utils import (
     generate_dataframe,
@@ -992,4 +993,79 @@ def time_float_32(self, shape, method):
         execute(self.df_ts_float32.fillna(method=method))
 
 
+class TimeLevelAlign:
+    params = [get_benchmark_shapes("TimeLevelAlign")]
+    param_names = ["shapes"]
+
+    def setup(self, shapes):
+        rows, cols = shapes[0]
+        rows_sqrt = round(math.sqrt(rows))
+        # the new number of rows may differ from the requested (slightly, so ok)
+        rows = rows_sqrt * rows_sqrt
+        self.index = IMPL.MultiIndex(
+            levels=[np.arange(10), np.arange(rows_sqrt), np.arange(rows_sqrt)],
+            codes=[
+                np.arange(10).repeat(rows),
+                np.tile(np.arange(rows_sqrt).repeat(rows_sqrt), 10),
+                np.tile(np.tile(np.arange(rows_sqrt), rows_sqrt), 10),
+            ],
+        )
+        self.df1 = IMPL.DataFrame(
+            np.random.randn(len(self.index), cols), index=self.index
+        )
+        self.df2 = IMPL.DataFrame(np.random.randn(*shapes[1]))
+        execute(self.df1), execute(self.df2)
+
+    def time_align_level(self, shapes):
+        left, right = self.df1.align(self.df2, level=1, copy=False)
+        execute(left), execute(right)
+
+    def time_reindex_level(self, shapes):
+        # `reindex` returns the same result here as `align`.
+        # Approximately the same performance is expected.
+        execute(self.df2.reindex(self.index, level=1))
+
+
+class TimeDropDuplicatesDataframe:
+
+    params = [get_benchmark_shapes("TimeDropDuplicatesDataframe")]
+    param_names = ["shape"]
+
+    def setup(self, shape):
+        rows, cols = shape
+        N = rows // 10
+        K = 10
+        self.df = IMPL.DataFrame()
+        # dataframe would  have cols-1 keys(strings) and one value(int) column
+        for col in range(cols - 1):
+            self.df["key" + str(col + 1)] = tm.makeStringIndex(N).values.repeat(K)
+        self.df["value"] = np.random.randn(N * K)
+        execute(self.df)
+
+    def time_drop_dups(self, shape):
+        execute(self.df.drop_duplicates(self.df.columns[:-1]))
+
+    def time_drop_dups_inplace(self, shape):
+        self.df.drop_duplicates(self.df.columns[:-1], inplace=True)
+        execute(self.df)
+
+
+class TimeDropDuplicatesSeries:
+
+    params = [get_benchmark_shapes("TimeDropDuplicatesSeries")]
+    param_names = ["shape"]
+
+    def setup(self, shape):
+        rows = shape[0]
+        self.series = IMPL.Series(np.tile(tm.makeStringIndex(rows // 10).values, 10))
+        execute(self.series)
+
+    def time_drop_dups(self, shape):
+        execute(self.series.drop_duplicates())
+
+    def time_drop_dups_string(self, shape):
+        self.series.drop_duplicates(inplace=True)
+        execute(self.series)
+
+
 from .utils import setup  # noqa: E402, F401
diff --git a/asv_bench/benchmarks/utils/data_shapes.py b/asv_bench/benchmarks/utils/data_shapes.py
--- a/asv_bench/benchmarks/utils/data_shapes.py
+++ b/asv_bench/benchmarks/utils/data_shapes.py
@@ -100,6 +100,7 @@
             "TimeReindex",
             "TimeReindexMethod",
             "TimeFillnaMethodDataframe",
+            "TimeDropDuplicatesDataframe",
             # IO benchmarks
             "TimeReadCsvSkiprows",
             "TimeReadCsvTrueFalseValues",
@@ -119,6 +120,7 @@
             "TimeConcat",
             "TimeAppend",
             "TimeBinaryOp",
+            "TimeLevelAlign",
         ],
     ),
     (
@@ -128,6 +130,7 @@
             "TimeFillnaSeries",
             "TimeIndexingNumericSeries",
             "TimeFillnaMethodSeries",
+            "TimeDropDuplicatesSeries",
         ],
     ),
     (


Test patch: