Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eager length checks #610

Merged
merged 14 commits into from
May 19, 2023
Merged

eager length checks #610

merged 14 commits into from
May 19, 2023

Conversation

samuelcolvin
Copy link
Member

WIP alternative take on #602 seems to have minimal performance impact, apart from copying list[Any] etc.

@codspeed-hq
Copy link

codspeed-hq bot commented May 17, 2023

CodSpeed Performance Report

Merging #610 eager-length-checks (3061b5c) will not alter performances.

Summary

🔥 0 improvements
❌ 4 regressions
✅ 114 untouched benchmarks

🆕 1 new benchmarks
⁉️ 0 dropped benchmarks

Benchmarks breakdown

Benchmark main eager-length-checks Change
test_list_of_any_core_py 25 µs 160.6 µs -541.42%
🆕 test_set_of_ints_core_length N/A 10.6 ms N/A
test_set_of_ints_core_json 6 ms 6.7 ms -11.58%
test_frozenset_of_ints_core 1.9 ms 2.4 ms -29.38%
test_frozenset_of_ints_duplicates_core 1.1 ms 1.3 ms -13.31%

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #610 (3061b5c) into main (2a7a2f6) will decrease coverage by 0.26%.
The diff coverage is 90.06%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #610      +/-   ##
==========================================
- Coverage   94.25%   93.99%   -0.26%     
==========================================
  Files          98       98              
  Lines       13188    13281      +93     
  Branches       25       25              
==========================================
+ Hits        12430    12484      +54     
- Misses        752      791      +39     
  Partials        6        6              
Impacted Files Coverage Δ
pydantic_core/core_schema.py 96.86% <ø> (-0.03%) ⬇️
src/input/mod.rs 100.00% <ø> (ø)
src/input/input_json.rs 89.39% <44.44%> (-3.52%) ⬇️
src/validators/tuple.rs 94.71% <88.75%> (-3.84%) ⬇️
src/input/return_enums.rs 88.72% <89.61%> (-2.16%) ⬇️
src/input/input_python.rs 98.43% <98.38%> (-0.29%) ⬇️
src/input/input_abstract.rs 85.29% <100.00%> (ø)
src/validators/frozenset.rs 100.00% <100.00%> (+1.96%) ⬆️
src/validators/list.rs 100.00% <100.00%> (ø)
src/validators/set.rs 100.00% <100.00%> (+1.35%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@adriangb adriangb marked this pull request as ready for review May 19, 2023 16:52
@adriangb adriangb merged commit b6e9baf into main May 19, 2023
@adriangb adriangb deleted the eager-length-checks branch May 19, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants