-
Notifications
You must be signed in to change notification settings - Fork 293
Allow non-scalar values as tagged union keys #655
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
Conversation
CodSpeed Performance ReportMerging #655 Summary
Benchmarks breakdown
|
please review |
Codecov Report
❗ 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 #655 +/- ##
==========================================
- Coverage 93.90% 93.74% -0.16%
==========================================
Files 99 99
Lines 13756 13726 -30
Branches 25 25
==========================================
- Hits 12917 12868 -49
- Misses 833 852 +19
Partials 6 6
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Does this solve the enum discriminator thing on the pydantic side? Also, are there any (non-benchmarked?) (negative) performance implications? Not that that would make me reject it but I think it's worth understanding. |
It doesn't seem like we have any benchmarks. I can add some to main and rebase this PR. |
fda02f2
to
093f6c5
Compare
Okay so small performance regression for JSON, probably because we now convert to Python just to match. We could do the same thing we do with literal validator where we try to match a Rust string/int before using a Python dict. The downside of that (aside from adding complexity) is that the match order is no longer preserved w.r.t. the input schema. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without looking through this in line-by-line detail, this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think this looks great.
I want to be a bit more sure that the performance regressions are an artefact of codspeed, not real - maybe we could create another trivial PR and see if we get the same thing?
@art049 is there any chance this big change in benchmarks is a result of issues with Codspeed?
please update. |
@samuelcolvin @adriangb I'm having a look to understand if it is noise or not since apparently it also happened in #656 . I'll keep you updated. Edit: let's follow up on #656 since it's easier to understand the behavior there. |
fe90d7a
to
cca08c4
Compare
please review |
e9c7331
to
9075107
Compare
9075107
to
83c2ceb
Compare
There we go now this has no performance degradations and actually makes some things 50% faster @samuelcolvin |
Since I think all of the feedback (including performance regressions) has been addressed I'm going to go ahead and merge this |
See also pydantic/pydantic#5958
Selected Reviewer: @samuelcolvin