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

ClassBuilder: eval only once

#1407
Comparing
tin/speed-up-eval
(
7721e18
) with
main
(
e048efc
)
CodSpeed Performance Gauge
+52%
Improvements
3
Regressions
0
Untouched
5
New
0
Dropped
0
Ignored
0

Benchmarks

Improved

test_create_simple_class_make_class
bench/test_benchmarks.py::test_create_simple_class_make_class
CodSpeed Performance Gauge
+52%
1,496.7 ms
983.5 ms
test_create_simple_class
bench/test_benchmarks.py::test_create_simple_class
CodSpeed Performance Gauge
+47%
1.5 s
1 s
test_create_frozen_class
bench/test_benchmarks.py::test_create_frozen_class
CodSpeed Performance Gauge
+38%
1.8 s
1.3 s

Passed

test_eq_unequal
bench/test_benchmarks.py::test_eq_unequal
CodSpeed Performance Gauge
0%
669.7 µs
668.4 µs
test_instantiate_with_defaults
bench/test_benchmarks.py::test_instantiate_with_defaults
CodSpeed Performance Gauge
0%
1.2 ms
1.2 ms
test_instantiate_no_defaults
bench/test_benchmarks.py::test_instantiate_no_defaults
CodSpeed Performance Gauge
0%
1.2 ms
1.2 ms
test_hash
bench/test_benchmarks.py::test_hash
CodSpeed Performance Gauge
0%
1.1 ms
1.1 ms
test_eq_equal
bench/test_benchmarks.py::test_eq_equal
CodSpeed Performance Gauge
0%
875.3 µs
876.6 µs

Commits

Click on a commit to change the comparison range
Base
main
e048efc
-91%
ClassBuilder: eval only once
0dc578e
2 days ago
by Tinche
0%
avoid Attribute.evolve
6618a8e
2 days ago
by Tinche
0%
speed up `_add_method_dunders`
8fe3d00
2 days ago
by Tinche
0%
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
cb5d376
2 days ago
by pre-commit-ci[bot]
0%
optimize _CountingAttrs more
011f82a
2 days ago
by Tinche
0%
Fix up `_add_method_dunders`
b6feb8b
1 day ago
by Tinche
+31%
avoid a hot splitlines
532faed
1 day ago
by Tinche
+114%
restore old type_hash
dc342b4
1 day ago
by Tinche
-1%
fix scriptlines handling
4e0af4b
1 day ago
by Tinche
0%
restore contextlib.suppress
cb60fff
1 day ago
by Tinche
-1%
add some hints
7c51993
1 day ago
by Tinche
0%
fix tests
7721e18
1 day ago
by Tinche
Home Terms PrivacyDocs