Closed elacuesta closed 2 years ago
Merging #62 (8733014) into master (1203b5e) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #62 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 285 291 +6
=========================================
+ Hits 285 291 +6
Impacted Files | Coverage Δ | |
---|---|---|
itemadapter/adapter.py | 100.00% <100.00%> (ø) |
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 1203b5e...8733014. Read the comment docs.
@elacuesta what motivates this change? Was it a real-world performance issue which is solved in this PR? I'm not sure I understand the implications of this PR - would it make itemadapter faster in a real world? The benchmark you posted is for Item vs dict creation, not for itemadapter before & after the change, probably I'm missing something :)
@Gallaecio reported a performance decrease in #59 (based on some research he did with itemloaders
), I tried to improve that with #60, but there are still a few things to try in order to keep improving. The benchmark tests both dict
and Item
creation, I executed it before and after the changes of this PR, showing a ~30% time decrease for dict
and a ~20% for Item
.
Ping @kmike 😄
Try to keep improving performance after #60.
It's my understanding that
any
is short-circuit, however there seems to be some penalty. Using a modified version of this benchmarking script:1203b5e54ad75c50279f8bbee05837a6f0c1d63c (master branch)
873301421945cc80ee6d5fd95969203b5b2cae2e (this branch)
The above numbers are from a 2020 Macbook Pro, Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz