pydantic
pydantic-core
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Use stricter serializer for unions of simple types
#1132
Merged
Comparing
alexdrydew:pick_correct_serializer_for_simple_unions
(
16370b4
) with
main
(
4df7624
)
CodSpeed Performance Gauge
-13%
Regression
1
Untouched
139
Benchmarks
Mode
CPU Simulation
Wall Time
Memory
Status
Regression
Untouched
140 total
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
-13%
21.4 µs
24.6 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_small_class_core_model
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+3%
32.7 µs
31.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+3%
31.3 µs
30.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_set_of_ints_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
792.7 µs
773.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_set_of_ints_core_length
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
804 µs
785.8 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_set_of_ints_core_json_duplicates
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
716.4 µs
700.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_future
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
+2%
20.3 µs
19.9 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_validate_literal[json-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
20.5 µs
20.1 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_positional_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
21.5 µs
21.1 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_set_of_ints_core_json
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
1.2 ms
1.1 ms
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_validate_literal[python-few_mixed]
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
19.1 µs
18.8 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_tuple_many_variable
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
21.3 µs
21 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_variable_tuple
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+2%
21.5 µs
21.2 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_arguments
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
27.6 µs
27.2 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_python
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
30.8 µs
30.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_int_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
44.2 µs
43.6 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_tuple_many_positional
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
21.3 µs
21 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_bool_core
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
23.7 µs
23.4 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_raise_error_value_error
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
37.4 µs
37 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_decimal_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
+1%
25.1 µs
24.8 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_string_strict_wrong_str_e
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
42.4 µs
42 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_uuid_from_string_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
+1%
36.9 µs
36.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_dont_raise_error_no_info
tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
17.8 µs
17.7 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_core_future_str
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
+1%
21.7 µs
21.5 µs
Uses the
CPU Simulation instrument
to collect CPU performance metrics.
test_smart_union_core
tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
15.9 µs
15.7 µs
1
2
...
6
Commits
Click on a commit to change the comparison range
Base
main
4df7624
+23.26%
Use stricter serializer for unions of simple types
7c6f41a
2 years ago
by alexdrydew
-36.25%
Implement retry_with_lax_check in build_simple_serializer
16370b4
2 years ago
by alexdrydew
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs