Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

changes to sequences to improve performance#179

Merged
samuelcolvin merged 2 commits intomainfrom
sequence-changes
Jul 19, 2022
Merged

changes to sequences to improve performance#179
samuelcolvin merged 2 commits intomainfrom
sequence-changes

Conversation

@samuelcolvin
Copy link
Copy Markdown
Member

@samuelcolvin samuelcolvin commented Jul 19, 2022

Benchmarks:

Benchmarks Comparison                                                                                  
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃  Group            ┃  Benchmark                 ┃  Before (µs/iter)  ┃  After (µs/iter)  ┃   Change  ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│  List[TypedDict]  │  list_of_dict_models_core  │             11.69  │            11.66  │   -0.23%  │
├───────────────────┼────────────────────────────┼────────────────────┼───────────────────┼───────────┤
│  List             │  list_of_ints_core_py      │             232.4  │            227.4  │   -2.14%  │
├───────────────────┼────────────────────────────┼────────────────────┼───────────────────┼───────────┤
│  List JSON        │  list_of_ints_core_json    │             98.28  │            100.3  │   +2.05%  │
├───────────────────┼────────────────────────────┼────────────────────┼───────────────────┼───────────┤
│  List[Any]        │  list_of_any_core_py       │             24.72  │            19.67  │  -20.41%  │
├───────────────────┼────────────────────────────┼────────────────────┼───────────────────┼───────────┤
│  List[Nullable]   │  list_of_nullable_core     │             20.44  │            21.00  │   +2.77%  │
└───────────────────┴────────────────────────────┴────────────────────┴───────────────────┴───────────┘

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 19, 2022

Codecov Report

Merging #179 (20571aa) into main (69bbc9f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   97.92%   97.93%           
=======================================
  Files          45       45           
  Lines        4444     4455   +11     
  Branches       32       32           
=======================================
+ Hits         4352     4363   +11     
  Misses         92       92           
Impacted Files Coverage Δ
src/validators/mod.rs 98.19% <ø> (ø)
src/input/return_enums.rs 96.37% <100.00%> (+1.04%) ⬆️
src/validators/frozenset.rs 100.00% <100.00%> (ø)
src/validators/list.rs 100.00% <100.00%> (ø)
src/validators/set.rs 96.00% <100.00%> (-0.78%) ⬇️
src/validators/tuple.rs 99.03% <100.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69bbc9f...20571aa. Read the comment docs.

@samuelcolvin samuelcolvin merged commit d692b43 into main Jul 19, 2022
@samuelcolvin samuelcolvin deleted the sequence-changes branch July 19, 2022 13:11
davidhewitt pushed a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
* changes to sequences to improve performance

* add list[any] pydantic benchmark

Original-commit-hash: d692b43
davidhewitt pushed a commit to pydantic/pydantic that referenced this pull request Oct 22, 2025
* changes to sequences to improve performance

* add list[any] pydantic benchmark

Original-commit-link: pydantic/pydantic-core@d692b43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant