Closed lqd closed 5 years ago
I think the code used to have a from_vec
in it, if you want to avoid specialization (I would, because I've been bit by "nightly isn't stable" enough). It is less fabulous, but perhaps clearer?
I don't mind either way :) That's why I was interested in y'all's opinion, and will update this PR accordingly!
Sticking to stable is worth it, so I'll pub
the from_vec
fn which is still here of course, and use that instead.
Although, if I do this now it'll break the treefrog PR, as the leapjoin creates non-empty Relations (and so will benefit from bypassing the Vec consumption) — so it might be interesting to wait a bit, say for #11 to possibly land, in order to update both this PR and then Polonius.
I too think it would be wise to stick to stable if possible — since this lives outside the rust-lang repo, it will make coordinating breaking changes much easier.
agreed, I'll reopen this PR once #11 lands so that I can switch from specialization to using from_vec
everywhere in one fell swoop in datafrog and then in Polonius.
While this makes 🐸 rely on an unstable feature, it can help avoiding consuming Vecs and collecting them immediately afterwards.
For example, it should prevent 81k of such cases in Polonius'
clap
benchmark, for thedatafrogopt
variant. (It's not a huge time saving in this case, but still)Thoughts ? (especially if we'd want to add a
rust-toolchain
file, or still support stable by having different functions forIntoInter
andVec
)