-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
[pipeline] Use conj! as the default pipeline rf #191
base: master
Are you sure you want to change the base?
Conversation
7c4d1cc
to
5596fb2
Compare
Not sure this is really "non-invasive" if everything using |
I understand what you are saying. However, the tests that I've changed, for example, extend the method EDIT: this may be relevant https://clojure.org/reference/transducers#_creating_transducible_processes.
It is possible to rewrite this PR without having to resort to 1-arity if the compatibility here is crucial. Regarding the benchmarks: I did benchmarks for multiple changes at once. Each change is not very impressive number-wise on its own, but together they chip away quite a bit. I'll do separate benchmarks for this PR and post them. |
5596fb2
to
dd09a66
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #191 +/- ##
==========================================
+ Coverage 83.55% 83.65% +0.09%
==========================================
Files 37 37
Lines 2506 2515 +9
Branches 212 212
==========================================
+ Hits 2094 2104 +10
+ Misses 200 199 -1
Partials 212 212 ☔ View full report in Codecov by Sentry. |
I did benchmarks of this against the current master and the allocations are 20% lower but timing results are inconclusive. Let's wait with this PR if favor of the others, and revisit it once other are merged. |
dd09a66
to
08af6fc
Compare
UpdateHere are the results for this PR on the usual select 10k rows benchmark:
So, it nets ~8% time improvement and ~15% allocation reduction. The reduced allocations are quite tasty; this almost achieves the level of overhead that the raw Given that you are concerned about how much change will be necessary in Metabase, I'm going to try this out in Metabase in advance. UPD: Turns out, Metabase tests don't fail after this change (see metabase/metabase#51772). I suppose, Metabase already uses the rf "properly", invoking the one-arg arity as the completion. |
Another small but non-invasive improvement. This works best when many rows are processed, but shouldn't bring too much of an overhead if one/few rows are selected.