Avatar for the pola-rs user
pola-rs
polars
BlogDocsChangelog

perf: Half the size of Booleans in row encoding

#19927Merged
Comparing
coastalwhite:perf/bool-row-encoding
(
7615e2c
) with
main
(
5b3a8f9
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
41
New
0
Dropped
0
Ignored
1

Benchmarks

Passed

test_pdsh_q6
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q6
CodSpeed Performance Gauge
+7%
3.9 ms
3.7 ms
test_pdsh_q5
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q5
CodSpeed Performance Gauge
+5%
6.4 ms
6.1 ms
test_pdsh_q12
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q12
CodSpeed Performance Gauge
+5%
8.4 ms
8 ms
test_pdsh_q7
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q7
CodSpeed Performance Gauge
+3%
10.6 ms
10.3 ms
test_groupby_h2oai_q4
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q4
CodSpeed Performance Gauge
+3%
1.9 ms
1.9 ms
test_pdsh_q11
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q11
CodSpeed Performance Gauge
+2%
4 ms
4 ms
test_pdsh_q10
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q10
CodSpeed Performance Gauge
+2%
8.8 ms
8.6 ms
test_pdsh_q16
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q16
CodSpeed Performance Gauge
+2%
8.4 ms
8.2 ms
test_to_numpy_series_zero_copy
py-polars/tests/benchmark/interop/test_numpy.py::test_to_numpy_series_zero_copy
CodSpeed Performance Gauge
+1%
125.4 µs
123.7 µs
test_groupby_h2oai_q9
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q9
CodSpeed Performance Gauge
+1%
28.1 ms
27.7 ms
test_single_inequality
py-polars/tests/benchmark/test_join_where.py::test_single_inequality
CodSpeed Performance Gauge
+1%
77.5 ms
76.5 ms
test_groupby_h2oai_q7
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q7
CodSpeed Performance Gauge
+1%
2 ms
2 ms
test_pdsh_q1
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q1
CodSpeed Performance Gauge
+1%
26.6 ms
26.4 ms
test_pdsh_q22
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q22
CodSpeed Performance Gauge
+1%
16.4 ms
16.2 ms
test_filter1
py-polars/tests/benchmark/test_filter.py::test_filter1
CodSpeed Performance Gauge
+1%
780.2 µs
773.8 µs
test_pdsh_q2
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q2
CodSpeed Performance Gauge
+1%
4.2 ms
4.2 ms
test_groupby_h2oai_q5
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q5
CodSpeed Performance Gauge
+1%
1.9 ms
1.9 ms
test_to_numpy_series_chunked
py-polars/tests/benchmark/interop/test_numpy.py::test_to_numpy_series_chunked
CodSpeed Performance Gauge
+1%
273.1 µs
271.7 µs
test_pdsh_q13
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q13
CodSpeed Performance Gauge
0%
10.7 ms
10.6 ms
test_to_numpy_series_with_nulls
py-polars/tests/benchmark/interop/test_numpy.py::test_to_numpy_series_with_nulls
CodSpeed Performance Gauge
0%
324.5 µs
323.3 µs
test_pdsh_q14
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q14
CodSpeed Performance Gauge
0%
3.3 ms
3.3 ms
test_pdsh_q20
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q20
CodSpeed Performance Gauge
0%
7.4 ms
7.4 ms
test_pdsh_q9
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q9
CodSpeed Performance Gauge
0%
27.6 ms
27.6 ms
test_write_read_scan_large_csv
py-polars/tests/benchmark/test_io.py::test_write_read_scan_large_csv
CodSpeed Performance Gauge
0%
39.9 ms
39.9 ms
test_datetime_range_fast_slow_paths
py-polars/tests/unit/functions/range/test_datetime_range.py::test_datetime_range_fast_slow_paths
CodSpeed Performance Gauge
0%
396.5 ms
397 ms
test_non_strict_inequalities
py-polars/tests/benchmark/test_join_where.py::test_non_strict_inequalities
CodSpeed Performance Gauge
0%
175.7 ms
175.9 ms
test_pdsh_q19
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q19
CodSpeed Performance Gauge
0%
8.9 ms
8.9 ms
test_pdsh_q21
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q21
CodSpeed Performance Gauge
0%
217.3 ms
218.1 ms
test_strict_inequalities
py-polars/tests/benchmark/test_join_where.py::test_strict_inequalities
CodSpeed Performance Gauge
0%
170.3 ms
171.1 ms
test_groupby_h2oai_q2
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q2
CodSpeed Performance Gauge
-1%
4.6 ms
4.6 ms
test_pdsh_q17
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q17
CodSpeed Performance Gauge
-1%
7.6 ms
7.7 ms
test_groupby_h2oai_q1
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q1
CodSpeed Performance Gauge
-1%
2.1 ms
2.1 ms
test_groupby_h2oai_q3
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q3
CodSpeed Performance Gauge
-1%
2.3 ms
2.3 ms
test_pdsh_q8
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q8
CodSpeed Performance Gauge
-2%
7.4 ms
7.6 ms
test_groupby_h2oai_q6
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q6
CodSpeed Performance Gauge
-2%
12.5 ms
12.7 ms
test_pdsh_q3
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q3
CodSpeed Performance Gauge
-2%
7.8 ms
7.9 ms
test_pdsh_q18
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q18
CodSpeed Performance Gauge
-3%
13.5 ms
13.9 ms
test_groupby_h2oai_q10
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q10
CodSpeed Performance Gauge
-3%
6.3 ms
6.5 ms
test_pdsh_q4
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q4
CodSpeed Performance Gauge
-5%
5.9 ms
6.2 ms
test_groupby_h2oai_q8
py-polars/tests/benchmark/test_group_by.py::test_groupby_h2oai_q8
CodSpeed Performance Gauge
-5%
2.9 ms
3 ms
test_pdsh_q15
py-polars/tests/benchmark/test_pdsh.py::test_pdsh_q15
CodSpeed Performance Gauge
-7%
3.3 ms
3.6 ms

Ignored

test_filter2Ignored
py-polars/tests/benchmark/test_filter.py::test_filter2
CodSpeed Performance Gauge
+3%
1.1 ms
1.1 ms

Commits

Click on a commit to change the comparison range
Base
main
5b3a8f9
0%
perf: Half the size of Booleans in row encoding This changes the encoding of `pl.Boolean` in the row encoding from needing 2 bytes (1 for validity, 1 for value) to 1 byte. Now, the encoding of Boolean values is as follows: | Value | Encoding | |---------|----------| | `None` | `0x00` | | `False` | `0x20` | | `True` | `0x30` | The null is bitwise inverted for `nulls_last=True` and `False` / `True` are inverted for `descending=True`.
7615e2c
5 months ago
by coastalwhite
© 2025 CodSpeed Technology
Home Terms PrivacyDocs