Avatar for the python-attrs user
python-attrs
cattrs
BlogDocsChangelog

Introduce tuple structuring hook factories

#737
Comparing
tin/tuple-factories
(
52e553a
) with
main
(
ec6f824
)
CodSpeed Performance Gauge
+57%
Improvement
2
Untouched
62

Benchmarks

64 total
test_structure_hetero_tuple[False-Converter]
bench/test_tuples.py
CodSpeed Performance Gauge
+57%
40 µs25.6 µs
test_structure_hetero_tuple[True-Converter]
bench/test_tuples.py
CodSpeed Performance Gauge
+34%
42.5 µs31.7 µs
test_structure_homo_tuple[True-Converter]
bench/test_tuples.py
CodSpeed Performance Gauge
+4%
34.7 µs33.4 µs
test_unstructure_attrs_nested[UnstructureStrategy.AS_DICT-Converter]
bench/test_attrs_nested.py
CodSpeed Performance Gauge
+4%
32.9 µs31.8 µs
test_unstructure_hetero_tuple[BaseConverter]
bench/test_tuples.py
CodSpeed Performance Gauge
+2%
14.8 µs14.5 µs
test_unstructure_simple_str_enum[MsgspecJsonConverter]
bench/test_enums.py
CodSpeed Performance Gauge
+2%
16.1 µs15.9 µs
test_unstructure_attrs_nested[UnstructureStrategy.AS_DICT-BaseConverter]
bench/test_attrs_nested.py
CodSpeed Performance Gauge
+1%
57.1 µs56.4 µs
test_unstructure_simple_str_enum[OrjsonConverter]
bench/test_enums.py
CodSpeed Performance Gauge
+1%
16 µs15.9 µs
test_unstructure_simple_str_enum[Converter]
bench/test_enums.py
CodSpeed Performance Gauge
+1%
16 µs15.9 µs
test_unstructure_int[Converter]
bench/test_primitives.py
CodSpeed Performance Gauge
+1%
16.1 µs15.9 µs
test_unstructure_simple_str_enum[BaseConverter]
bench/test_enums.py
CodSpeed Performance Gauge
+1%
15.4 µs15.3 µs
test_unstructure_hetero_tuple[Converter]
bench/test_tuples.py
CodSpeed Performance Gauge
+1%
17.3 µs17.2 µs
test_structure_simple_enum[BaseConverter]
bench/test_enums.py
CodSpeed Performance Gauge
0%
21.6 µs21.6 µs
test_structure_simple_int_enum[BaseConverter]
bench/test_enums.py
CodSpeed Performance Gauge
0%
21.2 µs21.3 µs
test_structure_hetero_tuple[False-BaseConverter]
bench/test_tuples.py
CodSpeed Performance Gauge
0%
40.7 µs40.8 µs
test_unstructure_int[BaseConverter]
bench/test_primitives.py
CodSpeed Performance Gauge
0%
15.4 µs15.4 µs
test_unstructure_float[Converter]
bench/test_primitives.py
CodSpeed Performance Gauge
0%
16 µs16 µs
test_structure_homo_tuple[False-BaseConverter]
bench/test_tuples.py
CodSpeed Performance Gauge
0%
38.3 µs38.5 µs
test_structure_simple_str_enum[BaseConverter]
bench/test_enums.py
CodSpeed Performance Gauge
-1%
21.3 µs21.4 µs
test_structure_simple_int_enum[MsgspecJsonConverter]
bench/test_enums.py
CodSpeed Performance Gauge
-1%
22.2 µs22.3 µs
test_structure_simple_int_enum[Converter]
bench/test_enums.py
CodSpeed Performance Gauge
-1%
22 µs22.1 µs
test_structure_hetero_tuple[True-BaseConverter]
bench/test_tuples.py
CodSpeed Performance Gauge
-1%
46.4 µs46.7 µs
test_unstructure_float[BaseConverter]
bench/test_primitives.py
CodSpeed Performance Gauge
-1%
15.3 µs15.4 µs
test_structure_homo_tuple[True-BaseConverter]
bench/test_tuples.py
CodSpeed Performance Gauge
-1%
36 µs36.2 µs
test_unstructure_simple_enum[OrjsonConverter]
bench/test_enums.py
CodSpeed Performance Gauge
-1%
19.1 µs19.2 µs

Commits

Click on a commit to change the comparison range
Base
main
ec6f824
+55.08%
Introduce tuple structuring hook factories
2fa4266
7 days ago
by Tinche
+1.6%
Add test for coverage
52e553a
7 days ago
by Tinche
© 2026 CodSpeed Technology
Home Terms Privacy Docs