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

Fix #1325: Put cached properties in class __dict__ (not the nonexistent instance __dict__) for slotted classes

#1516Closed
Comparing
clayote:cache_prop_slots_doc
(
e0df484
) with
main
(
c44b8b0
)
CodSpeed Performance Gauge
0%
Untouched
15

Benchmarks

15 total
test_astuple_complicated
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
9.4 ms9.4 ms
test_repeated_access
bench/test_benchmarks.py::TestCachedProperties
CodSpeed Performance Gauge
0%
238.5 µs238.1 µs
test_asdict_complicated
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
10 ms10 ms
test_instantiate_no_defaults
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
test_eq_equal
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
851.9 µs851.8 µs
test_instantiate_with_defaults
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
test_hash
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
test_eq_unequal
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
654 µs654 µs
test_create_simple_class_make_class
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.2 s1.2 s
test_create_cached_property_class
bench/test_benchmarks.py::TestCachedProperties
CodSpeed Performance Gauge
0%
2 s2 s
test_create_frozen_class
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.5 s1.5 s
test_create_simple_class
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
1.2 s1.3 s
test_asdict_atomic
bench/test_benchmarks.py
CodSpeed Performance Gauge
0%
6.6 ms6.6 ms
test_first_access
bench/test_benchmarks.py::TestCachedProperties
CodSpeed Performance Gauge
0%
6.4 ms6.4 ms
test_astuple_atomic
bench/test_benchmarks.py
CodSpeed Performance Gauge
-1%
6 ms6 ms

Commits

Click on a commit to change the comparison range
Base
main
c44b8b0
-0.06%
Generate `__slots__` dictionary with Sphinx-friendly docstrings
8bfb9f1
19 hours ago
by clayote
+0.02%
[pre-commit.ci] auto fixes from pre-commit.com hooks
247dd66
18 hours ago
by pre-commit-ci[bot]
0%
Merge remote-tracking branch 'origin/cache_prop_slots_doc' into cache_prop_slots_doc
0436288
18 hours ago
by clayote
-0.07%
Remove some pointless indentation
e060431
18 hours ago
by clayote
-0.04%
[pre-commit.ci] auto fixes from pre-commit.com hooks
e425764
18 hours ago
by pre-commit-ci[bot]
+0.01%
Merge remote-tracking branch 'origin/cache_prop_slots_doc' into cache_prop_slots_doc
fbaa316
6 hours ago
by clayote
+0.02%
Perform a very silly hack to make Sphinx document `@cached_property`
e0df484
6 hours ago
by clayote
© 2026 CodSpeed Technology
Home Terms Privacy Docs