Polars.NET Benchmark

February 26, 2026 · View on GitHub

Please refer to Polars.NET

This is the code warehouse for Polars.NET benchmark code. You can clone this repository then try these benchmarks on your own test machine.

If you would like to add more benchmark cases, please fork and submit a pull request. Thank you!

  • Environment:

    • OS: Fedora Linux 43 (KDE Plasma)

    • CPU & Memory: Intel Core i7-10700 @ 2.90GHz,32G RAM

    • Runtime: .NET 10.0.2 (RyuJIT X64), Python 3.14.2

    • Polars.NET & Polars.FSharp Version: v0.2.1-beta1

1. CSV Parsing & GroupBy (100M Rows)

  • Winner: Polars.NET
MethodMeanManaged Mem
Polars_Streaming1.688 s2.41 KB
DuckDB_SQL2.298 s5.86 KB
Microsoft_Data_Analysis171.973 s498 GB
Native_PLINQ38.723 s15.32 GB

2. Cosine Similarity (100M Elements)

  • Winner: TensorPrimitives / AVX2 For pure dense numerical computations, use .NET's TensorPrimitives. Polars.NET incurs overhead for expression planning.
MethodMeanManaged Mem
TensorPrimitives_CosSim37.31 ms0 B
Polars_CosSim261.96 ms2024 B
MathNet_CosSim1,381.02 ms592 MB
Linq_CosSim150.00 ms104 B

3. Decimal Rolling Average (100M Rows)

  • Winner: PLINQ. To prevent OOM exception, DuckDB.NET and Polars.NET are recommended here.
MethodMeanManaged Mem
Polars_Rolling_MA16.739 s2.73 KB
DuckDB_Rolling_MA5.677 s1.16 KB
Linq_Rolling_100M28.110 s1.29 GB
PLinq_Rolling_100M3.349 s7.87 GB

4. NDJSON Parsing (5M Rows)

  • Winner: DuckDB DuckDB's projection pushdown on JSON is superior. Polars.NET is still 3x faster than System.Text.Json and 10x faster than Newtonsoft.
MethodMeanManaged Mem
DuckDB_ScanNdjson764.1 ms2.73 KB
Polars_ScanNdjson2,279.5 ms3.6 KB
SystemTextJson_Process7,267.9 ms5.51 GB
Newtonsoft_Dynamic25,970.3 ms42.78 GB

5. Excel Parsing (1M Rows, 20 Cols)

  • Winner: Polars.NET Leveraging Rust's calamine crate via FFI allows Polars.NET to outperform dedicated .NET Excel libraries.
MethodMeanManaged Mem
Polars_Mixed14.74 s2.74 KB
MiniExcel_Mixed28.26 s15.94 GB
EPPlus_Mixed34.84 s10.33 GB

6. Join (20M Rows)

  • Winner: DuckDB / Polars.NET Both utilize high-performance Hash Joins. Traditional C# approaches (LINQ/MDA) are not viable for this scale.
MethodMeanManaged Mem
Polars_Join386.4 ms3.45 KB
DuckDB_Join286.9 ms1.2 KB
Linq_Join9,254.0 ms1.16 GB
MDA_Join15,346.4 ms5.83 GB

7. Polars.FSharp vs Deedle(Quant, same as 3)

  • Winner: Polars.NET 45x faster than Deedle.
MethodMeanManaged Mem
Deedle_Decimal_Rolling1,824.86 ms4.24 GB
Polars_Rolling41.89 ms1352 B

8. Polars.NET vs Python brothers(pandas and pypolars)

  • UDF (1M Rows)

    Winner: Polars.NET. RyuJIT outperforms Python interpreter in UDF case.

MethodMeanManaged Mem
Polars.NET_UDF177.6 ms228.74 MB
Pandas_UDF656.6 ms
PyPolars_UDF515.1 ms
  • GroupBy (10M Rows)

    Winner: Polars.NET. Very little diff between Polars.NET and pypolars.

MethodMeanManaged Mem
Polars.NET_GroupBy16.75 ms741 B
PyPolars_GroupBy17.70 ms
Pandas_GroupBy145.73 ms