"""Sum the same contiguous Int64 series in pandas and Polars."""

import pandas as pd
import polars as pl

IMPLEMENTATIONS = ("pandas", "polars")
SIZES = (1_000, 100_000, 1_000_000)
SERIES = {
    ("pandas", size): pd.Series(range(size), dtype="int64")
    for size in SIZES
}
SERIES.update({("polars", size): pl.Series(range(size), dtype=pl.Int64) for size in SIZES})


def bench_series_sum(implementation, size):
    return SERIES[implementation, size].sum()


bench_series_sum.params = [IMPLEMENTATIONS, SIZES]
bench_series_sum.param_names = ["implementation", "size"]
