1.7.13 Performance🔗ℹ

The post’s loads take 3.7 s (data-frame) and 7.1 s (tabular-asa) under Racket 8.6 CS, on its author’s machine in 2023. On the bench’s host, rkt-polars loads the post’s TSV in 21.5 ms and Python polars in 20.8 ms. The two pairs come from different machines, so compare within each pair, not across.

The bench’s ratio table, measured on 2026-09-29 (not a live timing): rkt-polars as of the categoricals change (#128; polars crate 0.55.2, Racket 9.3) against Python polars 1.42.1, on the full file, on an Intel Core i9-9900K (8 cores, 16 threads) at a one-minute load average of 1.7–2.8 (five-minute 6.8–7.0). Each time is the mean of two rounds, each round the median of 5 runs after a warm-up; each ratio is the mean of the two rounds’ ratios, which the bench takes before rounding. A ratio below 1 is faster than Python.

operation

  

rkt-polars ms

  

Python ms

  

ratio

load TSV

  

21.5

  

20.8

  

1.04

load CSV

  

21.3

  

20.9

  

1.02

lazy scan + collect

  

40.2

  

38.8

  

1.04

select

  

0.1

  

1.6

  

0.08

distinct

  

3.7

  

5.2

  

0.72

group-by count + mean

  

4.7

  

10.8

  

0.44

filter

  

4.9

  

4.6

  

1.07

sort + top 5

  

28.4

  

28.4

  

1.00

describe

  

20.3

  

18.9

  

1.07

column → list

  

3.2

  

4.2

  

0.81

dataframe → f64 matrix

  

30.1

  

19.0

  

1.59

cast 3 to categorical

  

5.3

  

4.8

  

1.11

group-by on categorical

  

2.8

  

9.3

  

0.30

categorical → list

  

4.2

  

12.1

  

0.35

The f64 matrix is the one operation over 1.2×; #115 tracks it.