diff --git a/benchmarks/dataframe_performance.cc b/benchmarks/dataframe_performance.cc index 446eca99..f617a91c 100644 --- a/benchmarks/dataframe_performance.cc +++ b/benchmarks/dataframe_performance.cc @@ -82,11 +82,10 @@ int main(int, char *[]) { const auto fourth = high_resolution_clock::now(); - df.sort("log_normal", sort_spec::ascen, - "exponential", sort_spec::ascen); - // df.sort("log_normal", sort_spec::ascen); - std::cout << "Number of rows after sort: " - << df.get_column("normal").size() << std::endl; + // df.sort("log_normal", sort_spec::ascen, + // "exponential", sort_spec::ascen); + // std::cout << "1001th value in normal column: " + // << df.get_column("normal")[1001] << std::endl; const auto fifth = high_resolution_clock::now(); @@ -96,9 +95,9 @@ int main(int, char *[]) { << "Selection time: " << double(duration_cast(fourth - third).count()) / 1000000.0 << " secs\n" - << "Sorting time: " - << double(duration_cast(fifth - fourth).count()) / 1000000.0 - << " secs\n" + // << "Sorting time: " + // << double(duration_cast(fifth - fourth).count()) / 1000000.0 + // << " secs\n" << "Overall time: " << double(duration_cast(fifth - first).count()) / 1000000.0 << " secs" diff --git a/benchmarks/polars_performance.py b/benchmarks/polars_performance.py index 55c6000f..f6b9463f 100644 --- a/benchmarks/polars_performance.py +++ b/benchmarks/polars_performance.py @@ -33,14 +33,13 @@ print(f"Number of rows after select: {df3.select(pl.count()).item()}") fourth = datetime.datetime.now() -df4 = df.sort(["log_normal", "exponential"]); -# df4 = df.sort("log_normal"); -print(f"Number of rows after sort: {df4.select(pl.count()).item()}") +# df4 = df.sort(["log_normal", "exponential"]); +# print(f"1001th value in normal column: {df4['normal'][1001]}") fifth = datetime.datetime.now() print(f"Calculation time: {(third - second).seconds}.{(third - second).microseconds} secs") print(f"Selection time: {(fourth - third).seconds}.{(fourth - third).microseconds} secs") -print(f"Sorting time: {(fifth - fourth).seconds}.{(fifth - fourth).microseconds} secs") +# print(f"Sorting time: {(fifth - fourth).seconds}.{(fifth - fourth).microseconds} secs") print(f"Overall time: {(fifth - first).seconds}.{(fifth - first).microseconds} secs") # ------------------------------------------------------------------------------